import gcc-toolset-9-binutils-2.32-15.el8
commit
af0011f924
@ -0,0 +1,2 @@
|
||||
cd45a512af1c8a508976c1beb4f5825b3bb89f4d SOURCES/binutils-2.32.tar.xz
|
||||
d3e5c9fc829ed40648110da6fe46c2fb1ed8aadb SOURCES/standards.info.gz
|
@ -0,0 +1,2 @@
|
||||
SOURCES/binutils-2.32.tar.xz
|
||||
SOURCES/standards.info.gz
|
@ -0,0 +1,38 @@
|
||||
# Generate OUTPUT_FORMAT line for .so files from the system linker output.
|
||||
# Imported from glibc/Makerules.
|
||||
|
||||
/ld.*[ ]-E[BL]/b f
|
||||
/collect.*[ ]-E[BL]/b f
|
||||
/OUTPUT_FORMAT[^)]*$/{N
|
||||
s/\n[ ]*/ /
|
||||
}
|
||||
t o
|
||||
: o
|
||||
s/^.*OUTPUT_FORMAT(\([^,]*\), \1, \1).*$/OUTPUT_FORMAT(\1)/
|
||||
t q
|
||||
s/^.*OUTPUT_FORMAT(\([^,]*\), \([^,]*\), \([^,]*\)).*$/\1,\2,\3/
|
||||
t s
|
||||
s/^.*OUTPUT_FORMAT(\([^,)]*\).*$)/OUTPUT_FORMAT(\1)/
|
||||
t q
|
||||
d
|
||||
: s
|
||||
s/"//g
|
||||
G
|
||||
s/\n//
|
||||
s/^\([^,]*\),\([^,]*\),\([^,]*\),B/OUTPUT_FORMAT(\2)/p
|
||||
s/^\([^,]*\),\([^,]*\),\([^,]*\),L/OUTPUT_FORMAT(\3)/p
|
||||
s/^\([^,]*\),\([^,]*\),\([^,]*\)/OUTPUT_FORMAT(\1)/p
|
||||
/,/s|^|*** BUG in libc/scripts/output-format.sed *** |p
|
||||
q
|
||||
: q
|
||||
s/"//g
|
||||
p
|
||||
q
|
||||
: f
|
||||
s/^.*[ ]-E\([BL]\)[ ].*$/,\1/
|
||||
t h
|
||||
s/^.*[ ]-E\([BL]\)$/,\1/
|
||||
t h
|
||||
d
|
||||
: h
|
||||
h
|
@ -0,0 +1,236 @@
|
||||
diff -rcp ../binutils-2.20.51.0.7.original/bfd/configure ./bfd/configure
|
||||
--- a/bfd/configure 2010-04-08 14:53:48.000000000 +0100
|
||||
+++ b/bfd/configure 2010-04-08 14:56:50.000000000 +0100
|
||||
@@ -10762,10 +10762,34 @@
|
||||
# before this can be enabled.
|
||||
hardcode_into_libs=yes
|
||||
|
||||
+ # find out which ABI we are using
|
||||
+ libsuff=
|
||||
+ case "$host_cpu" in
|
||||
+ x86_64*|s390*|powerpc*|ppc*|sparc*)
|
||||
+ echo 'int i;' > conftest.$ac_ext
|
||||
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
+ (eval $ac_compile) 2>&5
|
||||
+ ac_status=$?
|
||||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
+ (exit $ac_status); }; then
|
||||
+ case `/usr/bin/file conftest.$ac_objext` in
|
||||
+ *64-bit*)
|
||||
+ libsuff=64
|
||||
+ if test x"$sys_lib_search_path_spec" = x"/lib /usr/lib /usr/local/lib"; then
|
||||
+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
|
||||
+ fi
|
||||
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
|
||||
+ ;;
|
||||
+ esac
|
||||
+ fi
|
||||
+ rm -rf conftest*
|
||||
+ ;;
|
||||
+ esac
|
||||
+
|
||||
# Append ld.so.conf contents to the search path
|
||||
if test -f /etc/ld.so.conf; then
|
||||
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
|
||||
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
|
||||
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
|
||||
fi
|
||||
|
||||
# We used to test for /lib/ld.so.1 and disable shared libraries on
|
||||
diff -rcp ../binutils-2.20.51.0.7.original/binutils/configure ./binutils/configure
|
||||
--- a/binutils/configure 2010-04-08 14:53:45.000000000 +0100
|
||||
+++ b/binutils/configure 2010-04-08 14:56:21.000000000 +0100
|
||||
@@ -10560,10 +10560,34 @@
|
||||
# before this can be enabled.
|
||||
hardcode_into_libs=yes
|
||||
|
||||
+ # find out which ABI we are using
|
||||
+ libsuff=
|
||||
+ case "$host_cpu" in
|
||||
+ x86_64*|s390*|powerpc*|ppc*|sparc*)
|
||||
+ echo 'int i;' > conftest.$ac_ext
|
||||
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
+ (eval $ac_compile) 2>&5
|
||||
+ ac_status=$?
|
||||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
+ (exit $ac_status); }; then
|
||||
+ case `/usr/bin/file conftest.$ac_objext` in
|
||||
+ *64-bit*)
|
||||
+ libsuff=64
|
||||
+ if test x"$sys_lib_search_path_spec" = x"/lib /usr/lib /usr/local/lib"; then
|
||||
+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
|
||||
+ fi
|
||||
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
|
||||
+ ;;
|
||||
+ esac
|
||||
+ fi
|
||||
+ rm -rf conftest*
|
||||
+ ;;
|
||||
+ esac
|
||||
+
|
||||
# Append ld.so.conf contents to the search path
|
||||
if test -f /etc/ld.so.conf; then
|
||||
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
|
||||
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
|
||||
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
|
||||
fi
|
||||
|
||||
# We used to test for /lib/ld.so.1 and disable shared libraries on
|
||||
diff -rcp ../binutils-2.20.51.0.7.original/gas/configure ./gas/configure
|
||||
--- a/gas/configure 2010-04-08 14:53:47.000000000 +0100
|
||||
+++ b/gas/configure 2010-04-08 14:57:24.000000000 +0100
|
||||
@@ -10547,10 +10547,34 @@
|
||||
# before this can be enabled.
|
||||
hardcode_into_libs=yes
|
||||
|
||||
+ # find out which ABI we are using
|
||||
+ libsuff=
|
||||
+ case "$host_cpu" in
|
||||
+ x86_64*|s390*|powerpc*|ppc*|sparc*)
|
||||
+ echo 'int i;' > conftest.$ac_ext
|
||||
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
+ (eval $ac_compile) 2>&5
|
||||
+ ac_status=$?
|
||||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
+ (exit $ac_status); }; then
|
||||
+ case `/usr/bin/file conftest.$ac_objext` in
|
||||
+ *64-bit*)
|
||||
+ libsuff=64
|
||||
+ if test x"$sys_lib_search_path_spec" = x"/lib /usr/lib /usr/local/lib"; then
|
||||
+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
|
||||
+ fi
|
||||
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
|
||||
+ ;;
|
||||
+ esac
|
||||
+ fi
|
||||
+ rm -rf conftest*
|
||||
+ ;;
|
||||
+ esac
|
||||
+
|
||||
# Append ld.so.conf contents to the search path
|
||||
if test -f /etc/ld.so.conf; then
|
||||
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
|
||||
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
|
||||
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
|
||||
fi
|
||||
|
||||
# We used to test for /lib/ld.so.1 and disable shared libraries on
|
||||
diff -rcp ../binutils-2.20.51.0.7.original/gprof/configure ./gprof/configure
|
||||
--- a/gprof/configure 2010-04-08 14:53:45.000000000 +0100
|
||||
+++ b/gprof/configure 2010-04-08 14:57:50.000000000 +0100
|
||||
@@ -10485,10 +10485,34 @@
|
||||
# before this can be enabled.
|
||||
hardcode_into_libs=yes
|
||||
|
||||
+ # find out which ABI we are using
|
||||
+ libsuff=
|
||||
+ case "$host_cpu" in
|
||||
+ x86_64*|s390*|powerpc*|ppc*|sparc*)
|
||||
+ echo 'int i;' > conftest.$ac_ext
|
||||
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
+ (eval $ac_compile) 2>&5
|
||||
+ ac_status=$?
|
||||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
+ (exit $ac_status); }; then
|
||||
+ case `/usr/bin/file conftest.$ac_objext` in
|
||||
+ *64-bit*)
|
||||
+ libsuff=64
|
||||
+ if test x"$sys_lib_search_path_spec" = x"/lib /usr/lib /usr/local/lib"; then
|
||||
+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
|
||||
+ fi
|
||||
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
|
||||
+ ;;
|
||||
+ esac
|
||||
+ fi
|
||||
+ rm -rf conftest*
|
||||
+ ;;
|
||||
+ esac
|
||||
+
|
||||
# Append ld.so.conf contents to the search path
|
||||
if test -f /etc/ld.so.conf; then
|
||||
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
|
||||
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
|
||||
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
|
||||
fi
|
||||
|
||||
# We used to test for /lib/ld.so.1 and disable shared libraries on
|
||||
diff -rcp ../binutils-2.20.51.0.7.original/ld/configure ./ld/configure
|
||||
--- a/ld/configure 2010-04-08 14:53:44.000000000 +0100
|
||||
+++ b/ld/configure 2010-04-08 14:58:21.000000000 +0100
|
||||
@@ -10966,10 +10966,34 @@
|
||||
# before this can be enabled.
|
||||
hardcode_into_libs=yes
|
||||
|
||||
+ # find out which ABI we are using
|
||||
+ libsuff=
|
||||
+ case "$host_cpu" in
|
||||
+ x86_64*|s390*|powerpc*|ppc*|sparc*)
|
||||
+ echo 'int i;' > conftest.$ac_ext
|
||||
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
+ (eval $ac_compile) 2>&5
|
||||
+ ac_status=$?
|
||||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
+ (exit $ac_status); }; then
|
||||
+ case `/usr/bin/file conftest.$ac_objext` in
|
||||
+ *64-bit*)
|
||||
+ libsuff=64
|
||||
+ if test x"$sys_lib_search_path_spec" = x"/lib /usr/lib /usr/local/lib"; then
|
||||
+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
|
||||
+ fi
|
||||
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
|
||||
+ ;;
|
||||
+ esac
|
||||
+ fi
|
||||
+ rm -rf conftest*
|
||||
+ ;;
|
||||
+ esac
|
||||
+
|
||||
# Append ld.so.conf contents to the search path
|
||||
if test -f /etc/ld.so.conf; then
|
||||
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
|
||||
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
|
||||
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
|
||||
fi
|
||||
|
||||
# We used to test for /lib/ld.so.1 and disable shared libraries on
|
||||
Only in .: .#libtool.m4
|
||||
Only in .: #libtool.m4#
|
||||
diff -rcp ../binutils-2.20.51.0.7.original/opcodes/configure ./opcodes/configure
|
||||
--- a/opcodes/configure 2010-04-08 14:53:45.000000000 +0100
|
||||
+++ b/opcodes/configure 2010-04-08 14:59:10.000000000 +0100
|
||||
@@ -10496,10 +10496,34 @@
|
||||
# before this can be enabled.
|
||||
hardcode_into_libs=yes
|
||||
|
||||
+ # find out which ABI we are using
|
||||
+ libsuff=
|
||||
+ case "$host_cpu" in
|
||||
+ x86_64*|s390*|powerpc*|ppc*|sparc*)
|
||||
+ echo 'int i;' > conftest.$ac_ext
|
||||
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
+ (eval $ac_compile) 2>&5
|
||||
+ ac_status=$?
|
||||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
+ (exit $ac_status); }; then
|
||||
+ case `/usr/bin/file conftest.$ac_objext` in
|
||||
+ *64-bit*)
|
||||
+ libsuff=64
|
||||
+ if test x"$sys_lib_search_path_spec" = x"/lib /usr/lib /usr/local/lib"; then
|
||||
+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
|
||||
+ fi
|
||||
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
|
||||
+ ;;
|
||||
+ esac
|
||||
+ fi
|
||||
+ rm -rf conftest*
|
||||
+ ;;
|
||||
+ esac
|
||||
+
|
||||
# Append ld.so.conf contents to the search path
|
||||
if test -f /etc/ld.so.conf; then
|
||||
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
|
||||
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
|
||||
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
|
||||
fi
|
||||
|
||||
# We used to test for /lib/ld.so.1 and disable shared libraries on
|
@ -0,0 +1,28 @@
|
||||
--- a/bfd/bfd-in.h 2012-08-02 10:56:34.561769686 +0100
|
||||
+++ b/bfd/bfd-in.h 2012-08-02 11:13:27.134797755 +0100
|
||||
@@ -25,11 +25,6 @@
|
||||
#ifndef __BFD_H_SEEN__
|
||||
#define __BFD_H_SEEN__
|
||||
|
||||
-/* PR 14072: Ensure that config.h is included first. */
|
||||
-#if !defined PACKAGE && !defined PACKAGE_VERSION
|
||||
-#error config.h must be included before this header
|
||||
-#endif
|
||||
-
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
--- a/bfd/bfd-in2.h 2012-08-02 10:56:34.349769680 +0100
|
||||
+++ b/bfd/bfd-in2.h 2012-08-02 11:13:40.015798113 +0100
|
||||
@@ -32,11 +32,6 @@
|
||||
#ifndef __BFD_H_SEEN__
|
||||
#define __BFD_H_SEEN__
|
||||
|
||||
-/* PR 14072: Ensure that config.h is included first. */
|
||||
-#if !defined PACKAGE && !defined PACKAGE_VERSION
|
||||
-#error config.h must be included before this header
|
||||
-#endif
|
||||
-
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
@ -0,0 +1,38 @@
|
||||
diff -up binutils-2.25.orig/bfd/configure.ac binutils-2.25/bfd/configure.ac
|
||||
--- binutils-2.25.orig/bfd/configure.ac 2014-12-24 10:34:45.590491143 +0000
|
||||
+++ binutils-2.25/bfd/configure.ac 2014-12-24 10:36:12.997981992 +0000
|
||||
@@ -183,11 +183,13 @@ if test "x${ac_cv_sizeof_long}" = "x8";
|
||||
BFD_HOST_64BIT_LONG=1
|
||||
test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long"
|
||||
test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long"
|
||||
-elif test "x${ac_cv_sizeof_long_long}" = "x8"; then
|
||||
+fi
|
||||
+if test "x${ac_cv_sizeof_long_long}" = "x8"; then
|
||||
BFD_HOST_64BIT_LONG_LONG=1
|
||||
test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long"
|
||||
test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long long"
|
||||
- if test "x${ac_cv_sizeof_void_p}" = "x8"; then
|
||||
+ if test "x${ac_cv_sizeof_void_p}" = "x8" \
|
||||
+ -a "x${ac_cv_sizeof_long}" != "x8"; then
|
||||
BFD_HOSTPTR_T="unsigned long long"
|
||||
fi
|
||||
fi
|
||||
diff -up ../binutils-2.20.51.0.7.original/bfd/configure ./bfd/configure
|
||||
--- a/bfd/configure 2010-04-08 15:23:58.000000000 +0100
|
||||
+++ b/bfd/configure 2010-04-08 15:24:06.000000000 +0100
|
||||
@@ -12819,11 +12819,13 @@
|
||||
BFD_HOST_64BIT_LONG=1
|
||||
test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long"
|
||||
test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long"
|
||||
-elif test "x${ac_cv_sizeof_long_long}" = "x8"; then
|
||||
+fi
|
||||
+if test "x${ac_cv_sizeof_long_long}" = "x8"; then
|
||||
BFD_HOST_64BIT_LONG_LONG=1
|
||||
test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long"
|
||||
test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long long"
|
||||
- if test "x${ac_cv_sizeof_void_p}" = "x8"; then
|
||||
+ if test "x${ac_cv_sizeof_void_p}" = "x8" \
|
||||
+ -a "x${ac_cv_sizeof_long}" != "x8"; then
|
||||
BFD_HOSTPTR_T="unsigned long long"
|
||||
fi
|
||||
fi
|
@ -0,0 +1,44 @@
|
||||
--- binutils-2.26.orig/bfd/Makefile.am 2016-01-25 10:11:33.505289018 +0000
|
||||
+++ binutils-2.26/bfd/Makefile.am 2016-01-25 10:13:23.489964145 +0000
|
||||
@@ -1043,8 +1043,8 @@ DISTCLEANFILES = $(BUILD_CFILES) $(BUILD
|
||||
bfdver.h: $(srcdir)/version.h $(srcdir)/development.sh $(srcdir)/Makefile.in
|
||||
@echo "creating $@"
|
||||
@bfd_version=`echo "$(VERSION)" | $(SED) -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\
|
||||
- bfd_version_string="\"$(VERSION)\"" ;\
|
||||
- bfd_soversion="$(VERSION)" ;\
|
||||
+ bfd_version_string="\"$(VERSION)-%{release}\"" ;\
|
||||
+ bfd_soversion="$(VERSION)-%{release}" ;\
|
||||
bfd_version_package="\"$(PKGVERSION)\"" ;\
|
||||
report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\
|
||||
. $(srcdir)/development.sh ;\
|
||||
@@ -1055,7 +1055,7 @@ bfdver.h: $(srcdir)/version.h $(srcdir)/
|
||||
fi ;\
|
||||
$(SED) -e "s,@bfd_version@,$$bfd_version," \
|
||||
-e "s,@bfd_version_string@,$$bfd_version_string," \
|
||||
- -e "s,@bfd_version_package@,$$bfd_version_package," \
|
||||
+ -e "s,@bfd_version_package@,\"version \"," \
|
||||
-e "s,@report_bugs_to@,$$report_bugs_to," \
|
||||
< $(srcdir)/version.h > $@; \
|
||||
echo "$${bfd_soversion}" > libtool-soversion
|
||||
--- binutils-2.26.orig/bfd/Makefile.in 2016-01-25 10:11:33.505289018 +0000
|
||||
+++ binutils-2.26/bfd/Makefile.in 2016-01-25 10:14:17.818297941 +0000
|
||||
@@ -2111,8 +2111,8 @@ stmp-lcoff-h: $(LIBCOFF_H_FILES)
|
||||
bfdver.h: $(srcdir)/version.h $(srcdir)/development.sh $(srcdir)/Makefile.in
|
||||
@echo "creating $@"
|
||||
@bfd_version=`echo "$(VERSION)" | $(SED) -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\
|
||||
- bfd_version_string="\"$(VERSION)\"" ;\
|
||||
- bfd_soversion="$(VERSION)" ;\
|
||||
+ bfd_version_string="\"$(VERSION)-%{release}\"" ;\
|
||||
+ bfd_soversion="$(VERSION)-%{release}" ;\
|
||||
bfd_version_package="\"$(PKGVERSION)\"" ;\
|
||||
report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\
|
||||
. $(srcdir)/development.sh ;\
|
||||
@@ -2123,7 +2123,7 @@ bfdver.h: $(srcdir)/version.h $(srcdir)/
|
||||
fi ;\
|
||||
$(SED) -e "s,@bfd_version@,$$bfd_version," \
|
||||
-e "s,@bfd_version_string@,$$bfd_version_string," \
|
||||
- -e "s,@bfd_version_package@,$$bfd_version_package," \
|
||||
+ -e "s,@bfd_version_package@,\"version \"," \
|
||||
-e "s,@report_bugs_to@,$$report_bugs_to," \
|
||||
< $(srcdir)/version.h > $@; \
|
||||
echo "$${bfd_soversion}" > libtool-soversion
|
@ -0,0 +1,11 @@
|
||||
diff -rup binutils.orig/bfd/elfnn-aarch64.c binutils-2.27/bfd/elfnn-aarch64.c
|
||||
--- binutils.orig/bfd/elfnn-aarch64.c 2017-02-21 10:45:19.311956006 +0000
|
||||
+++ binutils-2.27/bfd/elfnn-aarch64.c 2017-02-21 11:55:07.517922655 +0000
|
||||
@@ -4947,6 +4947,7 @@ elfNN_aarch64_final_link_relocate (reloc
|
||||
it here if it is defined in a non-shared object. */
|
||||
if (h != NULL
|
||||
&& h->type == STT_GNU_IFUNC
|
||||
+ && (input_section->flags & SEC_ALLOC)
|
||||
&& h->def_regular)
|
||||
{
|
||||
asection *plt;
|
@ -0,0 +1,14 @@
|
||||
diff -rup binutils.orig/ld/ldmain.c binutils-2.28/ld/ldmain.c
|
||||
--- binutils.orig/ld/ldmain.c 2017-06-09 09:08:26.954016429 +0100
|
||||
+++ binutils-2.28/ld/ldmain.c 2017-06-09 09:09:11.307490976 +0100
|
||||
@@ -923,6 +923,10 @@ multiple_definition (struct bfd_link_inf
|
||||
obfd = h->u.def.section->owner;
|
||||
break;
|
||||
case bfd_link_hash_indirect:
|
||||
+ /* PR 21074: The GOLD linker can produce multiple indirect
|
||||
+ refences to the same symbol. These can be ignored. */
|
||||
+ if (bfd_is_ind_section (nsec))
|
||||
+ return;
|
||||
osec = bfd_ind_section_ptr;
|
||||
oval = 0;
|
||||
obfd = NULL;
|
@ -0,0 +1,124 @@
|
||||
--- binutils.orig/binutils/readelf.c 2018-01-22 15:48:10.450701702 +0000
|
||||
+++ binutils-2.30.0/binutils/readelf.c 2018-01-22 15:55:26.739588657 +0000
|
||||
@@ -19019,75 +19019,85 @@ process_file (char * file_name)
|
||||
Filedata * filedata = NULL;
|
||||
struct stat statbuf;
|
||||
char armag[SARMAG];
|
||||
- bfd_boolean ret = TRUE;
|
||||
+ bfd_boolean ret = FALSE;
|
||||
+ char * name;
|
||||
+ char * saved_program_name;
|
||||
+
|
||||
+ /* Overload program_name to include file_name. Doing this means
|
||||
+ that warning/error messages will positively identify the file
|
||||
+ concerned even when multiple instances of readelf are running. */
|
||||
+ name = xmalloc (strlen (program_name) + strlen (file_name) + 3);
|
||||
+ sprintf (name, "%s: %s", program_name, file_name);
|
||||
+ saved_program_name = program_name;
|
||||
+ program_name = name;
|
||||
|
||||
if (stat (file_name, &statbuf) < 0)
|
||||
{
|
||||
if (errno == ENOENT)
|
||||
- error (_("'%s': No such file\n"), file_name);
|
||||
+ error (_("No such file\n"));
|
||||
else
|
||||
- error (_("Could not locate '%s'. System error message: %s\n"),
|
||||
- file_name, strerror (errno));
|
||||
- return FALSE;
|
||||
+ error (_("Could not locate file. System error message: %s\n"),
|
||||
+ strerror (errno));
|
||||
+ goto done;
|
||||
}
|
||||
|
||||
if (! S_ISREG (statbuf.st_mode))
|
||||
{
|
||||
- error (_("'%s' is not an ordinary file\n"), file_name);
|
||||
- return FALSE;
|
||||
+ error (_("Not an ordinary file\n"));
|
||||
+ goto done;
|
||||
}
|
||||
|
||||
filedata = calloc (1, sizeof * filedata);
|
||||
if (filedata == NULL)
|
||||
{
|
||||
error (_("Out of memory allocating file data structure\n"));
|
||||
- return FALSE;
|
||||
+ goto done;
|
||||
}
|
||||
|
||||
filedata->file_name = file_name;
|
||||
filedata->handle = fopen (file_name, "rb");
|
||||
if (filedata->handle == NULL)
|
||||
{
|
||||
- error (_("Input file '%s' is not readable.\n"), file_name);
|
||||
- free (filedata);
|
||||
- return FALSE;
|
||||
+ error (_("Not readable\n"));
|
||||
+ goto done;
|
||||
}
|
||||
|
||||
if (fread (armag, SARMAG, 1, filedata->handle) != 1)
|
||||
{
|
||||
- error (_("%s: Failed to read file's magic number\n"), file_name);
|
||||
- fclose (filedata->handle);
|
||||
- free (filedata);
|
||||
- return FALSE;
|
||||
- }
|
||||
-
|
||||
- filedata->file_size = (bfd_size_type) statbuf.st_size;
|
||||
-
|
||||
- if (memcmp (armag, ARMAG, SARMAG) == 0)
|
||||
- {
|
||||
- if (! process_archive (filedata, FALSE))
|
||||
- ret = FALSE;
|
||||
- }
|
||||
- else if (memcmp (armag, ARMAGT, SARMAG) == 0)
|
||||
- {
|
||||
- if ( ! process_archive (filedata, TRUE))
|
||||
- ret = FALSE;
|
||||
+ error (_("Failed to read file's magic number\n"));
|
||||
}
|
||||
else
|
||||
{
|
||||
- if (do_archive_index)
|
||||
- error (_("File %s is not an archive so its index cannot be displayed.\n"),
|
||||
- file_name);
|
||||
+ filedata->file_size = (bfd_size_type) statbuf.st_size;
|
||||
|
||||
- rewind (filedata->handle);
|
||||
- archive_file_size = archive_file_offset = 0;
|
||||
-
|
||||
- if (! process_object (filedata))
|
||||
- ret = FALSE;
|
||||
+ if (memcmp (armag, ARMAG, SARMAG) == 0)
|
||||
+ {
|
||||
+ if (process_archive (filedata, FALSE))
|
||||
+ ret = TRUE;
|
||||
+ }
|
||||
+ else if (memcmp (armag, ARMAGT, SARMAG) == 0)
|
||||
+ {
|
||||
+ if (process_archive (filedata, TRUE))
|
||||
+ ret = TRUE;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ if (do_archive_index)
|
||||
+ error (_("Not an archive so its index cannot be displayed.\n"));
|
||||
+
|
||||
+ rewind (filedata->handle);
|
||||
+ archive_file_size = archive_file_offset = 0;
|
||||
+
|
||||
+ if (process_object (filedata))
|
||||
+ ret = TRUE;
|
||||
+ }
|
||||
}
|
||||
|
||||
fclose (filedata->handle);
|
||||
+ done:
|
||||
free (filedata);
|
||||
+ free (program_name);
|
||||
+ program_name = saved_program_name;
|
||||
|
||||
return ret;
|
||||
}
|
@ -0,0 +1,266 @@
|
||||
diff -rup binutils.orig/ld/testsuite/ld-i386/pltgot-1.d binutils-2.29.1/ld/testsuite/ld-i386/pltgot-1.d
|
||||
--- binutils.orig/ld/testsuite/ld-i386/pltgot-1.d 2017-11-15 13:32:39.335065263 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-i386/pltgot-1.d 2017-11-15 15:03:55.649727195 +0000
|
||||
@@ -2,6 +2,7 @@
|
||||
#readelf: -S --wide
|
||||
#as: --32
|
||||
|
||||
+#pass
|
||||
#...
|
||||
+\[ *[0-9]+\] \.plt +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+10 +.*
|
||||
#...
|
||||
diff -rup binutils.orig/ld/testsuite/ld-i386/pltgot-2.d binutils-2.29.1/ld/testsuite/ld-i386/pltgot-2.d
|
||||
--- binutils.orig/ld/testsuite/ld-i386/pltgot-2.d 2017-11-15 13:32:39.329065335 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-i386/pltgot-2.d 2017-11-15 15:04:20.803430034 +0000
|
||||
@@ -3,7 +3,6 @@
|
||||
#readelf: -d --wide
|
||||
#as: --32
|
||||
|
||||
-#failif
|
||||
#...
|
||||
+0x[0-9a-f]+ +\(PLTREL.*
|
||||
#...
|
||||
diff -rup binutils.orig/ld/testsuite/ld-i386/pr19636-2d.d binutils-2.29.1/ld/testsuite/ld-i386/pr19636-2d.d
|
||||
--- binutils.orig/ld/testsuite/ld-i386/pr19636-2d.d 2017-11-15 13:32:39.336065251 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-i386/pr19636-2d.d 2017-11-15 15:03:00.413379749 +0000
|
||||
@@ -9,7 +9,7 @@ Relocation section '\.rel\.dyn' at offse
|
||||
[0-9a-f]+ +[0-9a-f]+ +R_386_32 +0+ +func
|
||||
[0-9a-f]+ +[0-9a-f]+ +R_386_PC32 +0+ +func
|
||||
[0-9a-f]+ +[0-9a-f]+ +R_386_GLOB_DAT +0+ +func
|
||||
-
|
||||
+#...
|
||||
Symbol table '\.dynsym' contains [0-9]+ entries:
|
||||
+Num: +Value +Size Type +Bind +Vis +Ndx Name
|
||||
#...
|
||||
diff -rup binutils.orig/ld/testsuite/ld-i386/pr19636-2e.d binutils-2.29.1/ld/testsuite/ld-i386/pr19636-2e.d
|
||||
--- binutils.orig/ld/testsuite/ld-i386/pr19636-2e.d 2017-11-15 13:32:39.330065323 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-i386/pr19636-2e.d 2017-11-15 15:03:28.928042882 +0000
|
||||
@@ -9,7 +9,7 @@ Relocation section '\.rel\.dyn' at offse
|
||||
[0-9a-f]+ +[0-9a-f]+ +R_386_32 +0+ +func
|
||||
[0-9a-f]+ +[0-9a-f]+ +R_386_PC32 +0+ +func
|
||||
[0-9a-f]+ +[0-9a-f]+ +R_386_GLOB_DAT +0+ +func
|
||||
-
|
||||
+#...
|
||||
Symbol table '\.dynsym' contains [0-9]+ entries:
|
||||
+Num: +Value +Size Type +Bind +Vis +Ndx Name
|
||||
#...
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pltgot-1.d binutils-2.29.1/ld/testsuite/ld-x86-64/pltgot-1.d
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/pltgot-1.d 2017-11-15 13:32:39.415064300 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pltgot-1.d 2017-11-15 15:08:39.333375801 +0000
|
||||
@@ -2,8 +2,4 @@
|
||||
#readelf: -S --wide
|
||||
#as: --64
|
||||
|
||||
-#...
|
||||
- +\[ *[0-9]+\] \.plt +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+10 +.*
|
||||
-#...
|
||||
- +\[ *[0-9]+\] \.got\.plt +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+18 +.*
|
||||
#pass
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pltgot-2.d binutils-2.29.1/ld/testsuite/ld-x86-64/pltgot-2.d
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/pltgot-2.d 2017-11-15 13:32:39.404064432 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pltgot-2.d 2017-11-15 15:08:59.031143095 +0000
|
||||
@@ -3,7 +3,6 @@
|
||||
#readelf: -d --wide
|
||||
#as: --64
|
||||
|
||||
-#failif
|
||||
#...
|
||||
+0x[0-9a-f]+ +\(PLTREL.*
|
||||
#...
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/plt-main-bnd.dd binutils-2.29.1/ld/testsuite/ld-x86-64/plt-main-bnd.dd
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/plt-main-bnd.dd 2017-11-15 13:32:39.405064420 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/plt-main-bnd.dd 2017-11-15 15:06:53.694623801 +0000
|
||||
@@ -1,7 +1,4 @@
|
||||
-#...
|
||||
-Disassembly of section .plt.got:
|
||||
|
||||
-[a-f0-9]+ <[a-z_]+@plt>:
|
||||
-[ ]*[a-f0-9]+: f2 ff 25 .. .. 20 00 bnd jmpq \*0x20....\(%rip\) # ...... <.*>
|
||||
+#...
|
||||
[ ]*[a-f0-9]+: 90 nop
|
||||
#pass
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/plt-main-ibt.dd binutils-2.29.1/ld/testsuite/ld-x86-64/plt-main-ibt.dd
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/plt-main-ibt.dd 2017-11-15 13:32:39.412064336 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/plt-main-ibt.dd 2017-11-15 15:06:35.148842897 +0000
|
||||
@@ -1,7 +1,3 @@
|
||||
#...
|
||||
-Disassembly of section .plt.got:
|
||||
-
|
||||
-[a-f0-9]+ <[_a-z]+@plt>:
|
||||
[ ]*[a-f0-9]+: f3 0f 1e fa endbr64
|
||||
-[ ]*[a-f0-9]+: f2 ff 25 .. .. 20 00 bnd jmpq \*0x20....\(%rip\) # ...... <[_a-z]+>
|
||||
#pass
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/plt-main.rd binutils-2.29.1/ld/testsuite/ld-x86-64/plt-main.rd
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/plt-main.rd 2017-11-15 13:32:39.407064397 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/plt-main.rd 2017-11-15 15:06:17.244054423 +0000
|
||||
@@ -1,4 +1,3 @@
|
||||
-#failif
|
||||
#...
|
||||
[0-9a-f ]+R_X86_64_JUMP_SLOT +0+ +bar \+ 0
|
||||
#...
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr20830a.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830a.d
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/pr20830a.d 2017-11-15 13:32:39.412064336 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830a.d 2017-11-15 15:15:09.918750288 +0000
|
||||
@@ -20,6 +20,7 @@ Contents of the .eh_frame section:
|
||||
DW_CFA_offset: r16 \(rip\) at cfa-8
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
+#pass
|
||||
|
||||
0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001c8..00000000000001d4
|
||||
DW_CFA_nop
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr20830a-now.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830a-now.d
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/pr20830a-now.d 2017-11-15 13:32:39.413064324 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830a-now.d 2017-11-15 15:16:08.227055104 +0000
|
||||
@@ -20,6 +20,7 @@ Contents of the .eh_frame section:
|
||||
DW_CFA_offset: r16 \(rip\) at cfa-8
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
+#pass
|
||||
|
||||
0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001c8..00000000000001d4
|
||||
DW_CFA_nop
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr20830b.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830b.d
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/pr20830b.d 2017-11-15 13:32:39.413064324 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830b.d 2017-11-15 15:16:20.115913358 +0000
|
||||
@@ -20,7 +20,8 @@ Contents of the .eh_frame section:
|
||||
DW_CFA_offset: r16 \(rip\) at cfa-8
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
-
|
||||
+#pass
|
||||
+
|
||||
0+18 0000000000000010 0000001c FDE cie=00000000 pc=0000000000000138..0000000000000144
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr20830b-now.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830b-now.d
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/pr20830b-now.d 2017-11-15 13:32:39.411064348 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830b-now.d 2017-11-15 15:16:29.012807282 +0000
|
||||
@@ -20,7 +20,8 @@ Contents of the .eh_frame section:
|
||||
DW_CFA_offset: r16 \(rip\) at cfa-8
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
-
|
||||
+#pass
|
||||
+
|
||||
0+18 0000000000000010 0000001c FDE cie=00000000 pc=0000000000000138..0000000000000144
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr21038a.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038a.d
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/pr21038a.d 2017-11-15 13:32:39.408064384 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038a.d 2017-11-15 15:19:48.097433680 +0000
|
||||
@@ -19,7 +19,8 @@ Contents of the .eh_frame section:
|
||||
DW_CFA_offset: r16 \(rip\) at cfa-8
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
-
|
||||
+#pass
|
||||
+
|
||||
0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001c8..00000000000001d4
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr21038a-now.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038a-now.d
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/pr21038a-now.d 2017-11-15 13:32:39.401064469 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038a-now.d 2017-11-15 15:10:56.077760324 +0000
|
||||
@@ -20,7 +20,8 @@ Contents of the .eh_frame section:
|
||||
DW_CFA_offset: r16 \(rip\) at cfa-8
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
-
|
||||
+#pass
|
||||
+
|
||||
0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001c8..00000000000001d4
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr21038b.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038b.d
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/pr21038b.d 2017-11-15 13:32:39.405064420 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038b.d 2017-11-15 15:10:42.828916844 +0000
|
||||
@@ -19,6 +19,7 @@ Contents of the .eh_frame section:
|
||||
DW_CFA_offset: r16 \(rip\) at cfa-8
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
+#pass
|
||||
|
||||
0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001d8..00000000000001dd
|
||||
DW_CFA_nop
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr21038b-now.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038b-now.d
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/pr21038b-now.d 2017-11-15 13:32:39.416064288 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038b-now.d 2017-11-15 15:11:11.550577531 +0000
|
||||
@@ -20,7 +20,8 @@ Contents of the .eh_frame section:
|
||||
DW_CFA_offset: r16 \(rip\) at cfa-8
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
-
|
||||
+#pass
|
||||
+
|
||||
0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001d8..00000000000001dd
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr21038c.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038c.d
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/pr21038c.d 2017-11-15 13:32:39.411064348 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038c.d 2017-11-15 15:09:52.664509478 +0000
|
||||
@@ -19,7 +19,8 @@ Contents of the .eh_frame section:
|
||||
DW_CFA_offset: r16 \(rip\) at cfa-8
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
-
|
||||
+#pass
|
||||
+
|
||||
0+18 0000000000000014 0000001c FDE cie=00000000 pc=0000000000000220..0000000000000231
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr21038c-now.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038c-now.d
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/pr21038c-now.d 2017-11-15 13:32:39.413064324 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038c-now.d 2017-11-15 15:11:22.975442559 +0000
|
||||
@@ -20,7 +20,8 @@ Contents of the .eh_frame section:
|
||||
DW_CFA_offset: r16 \(rip\) at cfa-8
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
-
|
||||
+#pass
|
||||
+
|
||||
0+18 0000000000000014 0000001c FDE cie=00000000 pc=0000000000000220..0000000000000231
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/tlspic2.rd binutils-2.29.1/ld/testsuite/ld-x86-64/tlspic2.rd
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/tlspic2.rd 2017-11-15 13:32:39.417064276 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/tlspic2.rd 2017-11-15 15:05:02.950932110 +0000
|
||||
@@ -14,6 +14,7 @@ Section Headers:
|
||||
+\[[ 0-9]+\] .dynsym +.*
|
||||
+\[[ 0-9]+\] .dynstr +.*
|
||||
+\[[ 0-9]+\] .rela.dyn +.*
|
||||
+#pass
|
||||
+\[[ 0-9]+\] .plt +.*
|
||||
+\[[ 0-9]+\] .plt.got +.*
|
||||
+\[[ 0-9]+\] .text +PROGBITS +0+1000 0+1000 0+31a 00 +AX +0 +0 4096
|
||||
--- binutils.orig/bfd/elfxx-x86.c 2018-01-22 15:59:25.875788033 +0000
|
||||
+++ binutils-2.30.0/bfd/elfxx-x86.c 2018-01-22 16:00:20.789146597 +0000
|
||||
@@ -107,7 +107,7 @@ elf_x86_allocate_dynrelocs (struct elf_l
|
||||
plt_entry_size = htab->plt.plt_entry_size;
|
||||
|
||||
resolved_to_zero = UNDEFINED_WEAK_RESOLVED_TO_ZERO (info, eh);
|
||||
-
|
||||
+#if 0
|
||||
/* We can't use the GOT PLT if pointer equality is needed since
|
||||
finish_dynamic_symbol won't clear symbol value and the dynamic
|
||||
linker won't update the GOT slot. We will get into an infinite
|
||||
@@ -125,7 +125,7 @@ elf_x86_allocate_dynrelocs (struct elf_l
|
||||
/* Use the GOT PLT. */
|
||||
eh->plt_got.refcount = 1;
|
||||
}
|
||||
-
|
||||
+#endif
|
||||
/* Since STT_GNU_IFUNC symbol must go through PLT, we handle it
|
||||
here if it is defined and referenced in a non-shared object. */
|
||||
if (h->type == STT_GNU_IFUNC
|
||||
--- binutils.orig/ld/testsuite/ld-i386/pr20830.d 2018-07-09 09:49:51.277239857 +0100
|
||||
+++ binutils-2.30.90/ld/testsuite/ld-i386/pr20830.d 2018-07-09 10:32:41.113356733 +0100
|
||||
@@ -19,7 +19,7 @@ Contents of the .eh_frame section:
|
||||
DW_CFA_offset: r8 \(eip\) at cfa-4
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
-
|
||||
+#pass
|
||||
0+18 00000010 0000001c FDE cie=00000000 pc=00000128..00000133
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
@ -0,0 +1,110 @@
|
||||
--- binutils.orig/libiberty/cp-demangle.c 2019-04-10 10:31:27.854997707 +0100
|
||||
+++ binutils-2.31.1/libiberty/cp-demangle.c 2019-04-10 16:00:35.820350978 +0100
|
||||
@@ -858,7 +858,7 @@ CP_STATIC_IF_GLIBCPP_V3
|
||||
int
|
||||
cplus_demangle_fill_name (struct demangle_component *p, const char *s, int len)
|
||||
{
|
||||
- if (p == NULL || s == NULL || len == 0)
|
||||
+ if (p == NULL || s == NULL || len <= 0)
|
||||
return 0;
|
||||
p->d_printing = 0;
|
||||
p->type = DEMANGLE_COMPONENT_NAME;
|
||||
@@ -4032,7 +4032,7 @@ d_growable_string_callback_adapter (cons
|
||||
are larger than the actual numbers encountered. */
|
||||
|
||||
static void
|
||||
-d_count_templates_scopes (int *num_templates, int *num_scopes,
|
||||
+d_count_templates_scopes (struct d_print_info *dpi,
|
||||
const struct demangle_component *dc)
|
||||
{
|
||||
if (dc == NULL)
|
||||
@@ -4052,13 +4052,13 @@ d_count_templates_scopes (int *num_templ
|
||||
break;
|
||||
|
||||
case DEMANGLE_COMPONENT_TEMPLATE:
|
||||
- (*num_templates)++;
|
||||
+ dpi->num_copy_templates++;
|
||||
goto recurse_left_right;
|
||||
|
||||
case DEMANGLE_COMPONENT_REFERENCE:
|
||||
case DEMANGLE_COMPONENT_RVALUE_REFERENCE:
|
||||
if (d_left (dc)->type == DEMANGLE_COMPONENT_TEMPLATE_PARAM)
|
||||
- (*num_scopes)++;
|
||||
+ dpi->num_saved_scopes++;
|
||||
goto recurse_left_right;
|
||||
|
||||
case DEMANGLE_COMPONENT_QUAL_NAME:
|
||||
@@ -4122,42 +4122,42 @@ d_count_templates_scopes (int *num_templ
|
||||
case DEMANGLE_COMPONENT_TAGGED_NAME:
|
||||
case DEMANGLE_COMPONENT_CLONE:
|
||||
recurse_left_right:
|
||||
- d_count_templates_scopes (num_templates, num_scopes,
|
||||
- d_left (dc));
|
||||
- d_count_templates_scopes (num_templates, num_scopes,
|
||||
- d_right (dc));
|
||||
+ /* PR 89394 - Check for too much recursion. */
|
||||
+ if (dpi->recursion > DEMANGLE_RECURSION_LIMIT)
|
||||
+ /* FIXME: There ought to be a way to report to the
|
||||
+ user that the recursion limit has been reached. */
|
||||
+ return;
|
||||
+
|
||||
+ ++ dpi->recursion;
|
||||
+ d_count_templates_scopes (dpi, d_left (dc));
|
||||
+ d_count_templates_scopes (dpi, d_right (dc));
|
||||
+ -- dpi->recursion;
|
||||
break;
|
||||
|
||||
case DEMANGLE_COMPONENT_CTOR:
|
||||
- d_count_templates_scopes (num_templates, num_scopes,
|
||||
- dc->u.s_ctor.name);
|
||||
+ d_count_templates_scopes (dpi, dc->u.s_ctor.name);
|
||||
break;
|
||||
|
||||
case DEMANGLE_COMPONENT_DTOR:
|
||||
- d_count_templates_scopes (num_templates, num_scopes,
|
||||
- dc->u.s_dtor.name);
|
||||
+ d_count_templates_scopes (dpi, dc->u.s_dtor.name);
|
||||
break;
|
||||
|
||||
case DEMANGLE_COMPONENT_EXTENDED_OPERATOR:
|
||||
- d_count_templates_scopes (num_templates, num_scopes,
|
||||
- dc->u.s_extended_operator.name);
|
||||
+ d_count_templates_scopes (dpi, dc->u.s_extended_operator.name);
|
||||
break;
|
||||
|
||||
case DEMANGLE_COMPONENT_FIXED_TYPE:
|
||||
- d_count_templates_scopes (num_templates, num_scopes,
|
||||
- dc->u.s_fixed.length);
|
||||
+ d_count_templates_scopes (dpi, dc->u.s_fixed.length);
|
||||
break;
|
||||
|
||||
case DEMANGLE_COMPONENT_GLOBAL_CONSTRUCTORS:
|
||||
case DEMANGLE_COMPONENT_GLOBAL_DESTRUCTORS:
|
||||
- d_count_templates_scopes (num_templates, num_scopes,
|
||||
- d_left (dc));
|
||||
+ d_count_templates_scopes (dpi, d_left (dc));
|
||||
break;
|
||||
|
||||
case DEMANGLE_COMPONENT_LAMBDA:
|
||||
case DEMANGLE_COMPONENT_DEFAULT_ARG:
|
||||
- d_count_templates_scopes (num_templates, num_scopes,
|
||||
- dc->u.s_unary_num.sub);
|
||||
+ d_count_templates_scopes (dpi, dc->u.s_unary_num.sub);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -4192,8 +4192,12 @@ d_print_init (struct d_print_info *dpi,
|
||||
dpi->next_copy_template = 0;
|
||||
dpi->num_copy_templates = 0;
|
||||
|
||||
- d_count_templates_scopes (&dpi->num_copy_templates,
|
||||
- &dpi->num_saved_scopes, dc);
|
||||
+ d_count_templates_scopes (dpi, dc);
|
||||
+ /* If we did not reach the recursion limit, then reset the
|
||||
+ current recursion value back to 0, so that we can print
|
||||
+ the templates. */
|
||||
+ if (dpi->recursion < DEMANGLE_RECURSION_LIMIT)
|
||||
+ dpi->recursion = 0;
|
||||
dpi->num_copy_templates *= dpi->num_saved_scopes;
|
||||
|
||||
dpi->current_template = NULL;
|
@ -0,0 +1,13 @@
|
||||
--- binutils.orig/binutils/objdump.c 2019-02-25 16:12:30.394056901 +0000
|
||||
+++ binutils-2.31.1/binutils/objdump.c 2019-02-25 16:13:07.224778005 +0000
|
||||
@@ -2993,7 +2993,9 @@ dump_bfd_header (bfd *abfd)
|
||||
static void
|
||||
dump_bfd_private_header (bfd *abfd)
|
||||
{
|
||||
- bfd_print_private_bfd_data (abfd, stdout);
|
||||
+ if (!bfd_print_private_bfd_data (abfd, stdout))
|
||||
+ non_fatal (_("warning: private headers incomplete: %s"),
|
||||
+ bfd_errmsg (bfd_get_error ()));
|
||||
}
|
||||
|
||||
static void
|
@ -0,0 +1,32 @@
|
||||
--- binutils.orig/bfd/pei-x86_64.c 2019-02-25 16:12:29.798061414 +0000
|
||||
+++ binutils-2.31.1/bfd/pei-x86_64.c 2019-02-25 17:09:02.783425236 +0000
|
||||
@@ -541,7 +541,7 @@ pex64_bfd_print_pdata_section (bfd *abfd
|
||||
/* virt_size might be zero for objects. */
|
||||
if (stop == 0 && strcmp (abfd->xvec->name, "pe-x86-64") == 0)
|
||||
{
|
||||
- stop = (datasize / onaline) * onaline;
|
||||
+ stop = datasize;
|
||||
virt_size_is_zero = TRUE;
|
||||
}
|
||||
else if (datasize < stop)
|
||||
@@ -551,8 +551,8 @@ pex64_bfd_print_pdata_section (bfd *abfd
|
||||
_("Warning: %s section size (%ld) is smaller than virtual size (%ld)\n"),
|
||||
pdata_section->name, (unsigned long) datasize,
|
||||
(unsigned long) stop);
|
||||
- /* Be sure not to read passed datasize. */
|
||||
- stop = datasize / onaline;
|
||||
+ /* Be sure not to read past datasize. */
|
||||
+ stop = datasize;
|
||||
}
|
||||
|
||||
/* Display functions table. */
|
||||
@@ -724,8 +724,7 @@ pex64_bfd_print_pdata_section (bfd *abfd
|
||||
altent += imagebase;
|
||||
|
||||
if (altent >= pdata_vma
|
||||
- && (altent + PDATA_ROW_SIZE <= pdata_vma
|
||||
- + pei_section_data (abfd, pdata_section)->virt_size))
|
||||
+ && altent - pdata_vma + PDATA_ROW_SIZE <= stop)
|
||||
{
|
||||
pex64_get_runtime_function
|
||||
(abfd, &arf, &pdata[altent - pdata_vma]);
|
@ -0,0 +1,73 @@
|
||||
diff -rup binutils.orig/bfd/archive64.c binutils-2.31.1/bfd/archive64.c
|
||||
--- binutils.orig/bfd/archive64.c 2019-02-26 11:17:11.882530151 +0000
|
||||
+++ binutils-2.31.1/bfd/archive64.c 2019-02-26 11:19:18.422488805 +0000
|
||||
@@ -100,8 +100,6 @@ _bfd_archive_64_bit_slurp_armap (bfd *ab
|
||||
return FALSE;
|
||||
carsyms = ardata->symdefs;
|
||||
stringbase = ((char *) ardata->symdefs) + carsym_size;
|
||||
- stringbase[stringsize] = 0;
|
||||
- stringend = stringbase + stringsize;
|
||||
|
||||
raw_armap = (bfd_byte *) bfd_alloc (abfd, ptrsize);
|
||||
if (raw_armap == NULL)
|
||||
@@ -115,15 +113,17 @@ _bfd_archive_64_bit_slurp_armap (bfd *ab
|
||||
goto release_raw_armap;
|
||||
}
|
||||
|
||||
+ stringend = stringbase + stringsize;
|
||||
+ *stringend = 0;
|
||||
for (i = 0; i < nsymz; i++)
|
||||
{
|
||||
carsyms->file_offset = bfd_getb64 (raw_armap + i * 8);
|
||||
carsyms->name = stringbase;
|
||||
- if (stringbase < stringend)
|
||||
- stringbase += strlen (stringbase) + 1;
|
||||
+ stringbase += strlen (stringbase);
|
||||
+ if (stringbase != stringend)
|
||||
+ ++stringbase;
|
||||
++carsyms;
|
||||
}
|
||||
- *stringbase = '\0';
|
||||
|
||||
ardata->symdef_count = nsymz;
|
||||
ardata->first_file_filepos = bfd_tell (abfd);
|
||||
diff -rup binutils.orig/bfd/archive.c binutils-2.31.1/bfd/archive.c
|
||||
--- binutils.orig/bfd/archive.c 2019-02-26 11:17:11.884530134 +0000
|
||||
+++ binutils-2.31.1/bfd/archive.c 2019-02-26 11:18:33.354859687 +0000
|
||||
@@ -1014,6 +1014,7 @@ do_slurp_coff_armap (bfd *abfd)
|
||||
int *raw_armap, *rawptr;
|
||||
struct artdata *ardata = bfd_ardata (abfd);
|
||||
char *stringbase;
|
||||
+ char *stringend;
|
||||
bfd_size_type stringsize;
|
||||
bfd_size_type parsed_size;
|
||||
carsym *carsyms;
|
||||
@@ -1073,22 +1074,20 @@ do_slurp_coff_armap (bfd *abfd)
|
||||
}
|
||||
|
||||
/* OK, build the carsyms. */
|
||||
- for (i = 0; i < nsymz && stringsize > 0; i++)
|
||||
+ stringend = stringbase + stringsize;
|
||||
+ *stringend = 0;
|
||||
+ for (i = 0; i < nsymz; i++)
|
||||
{
|
||||
bfd_size_type len;
|
||||
|
||||
rawptr = raw_armap + i;
|
||||
carsyms->file_offset = swap ((bfd_byte *) rawptr);
|
||||
carsyms->name = stringbase;
|
||||
- /* PR 17512: file: 4a1d50c1. */
|
||||
- len = strnlen (stringbase, stringsize);
|
||||
- if (len < stringsize)
|
||||
- len ++;
|
||||
- stringbase += len;
|
||||
- stringsize -= len;
|
||||
+ stringbase += strlen (stringbase);
|
||||
+ if (stringbase != stringend)
|
||||
+ ++stringbase;
|
||||
carsyms++;
|
||||
}
|
||||
- *stringbase = 0;
|
||||
|
||||
ardata->symdef_count = nsymz;
|
||||
ardata->first_file_filepos = bfd_tell (abfd);
|
@ -0,0 +1,16 @@
|
||||
--- binutils.orig/binutils/readelf.c 2019-02-26 11:17:12.414525772 +0000
|
||||
+++ binutils-2.31.1/binutils/readelf.c 2019-02-26 12:11:40.642876742 +0000
|
||||
@@ -16009,6 +16009,13 @@ process_mips_specific (Filedata * fileda
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
+ /* PR 24243 */
|
||||
+ if (sect->sh_size < sizeof (* eopt))
|
||||
+ {
|
||||
+ error (_("The MIPS options section is too small.\n"));
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+
|
||||
eopt = (Elf_External_Options *) get_data (NULL, filedata, options_offset, 1,
|
||||
sect->sh_size, _("options"));
|
||||
if (eopt)
|
@ -0,0 +1,11 @@
|
||||
--- binutils.orig/gold/ftruncate.c 2019-06-25 11:36:51.074941484 +0100
|
||||
+++ binutils-2.32/gold/ftruncate.c 2019-06-25 11:37:28.108690037 +0100
|
||||
@@ -1,7 +1,6 @@
|
||||
/* ftruncate emulations that work on some System V's.
|
||||
- This file is in the public domain. */
|
||||
|
||||
-/* Copyright (C) 2012-2019 Free Software Foundation, Inc.
|
||||
+ Copyright (C) 2012-2019 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of gold.
|
||||
|
@ -0,0 +1,866 @@
|
||||
diff -rup binutils.orig/bfd/elfnn-aarch64.c binutils-2.32/bfd/elfnn-aarch64.c
|
||||
--- binutils.orig/bfd/elfnn-aarch64.c 2019-07-02 17:30:19.407892712 +0100
|
||||
+++ binutils-2.32/bfd/elfnn-aarch64.c 2019-07-02 17:35:21.874749884 +0100
|
||||
@@ -2579,6 +2579,9 @@ struct elf_aarch64_link_hash_table
|
||||
unsigned int top_index;
|
||||
asection **input_list;
|
||||
|
||||
+ /* JUMP_SLOT relocs for variant PCS symbols may be present. */
|
||||
+ int variant_pcs;
|
||||
+
|
||||
/* The offset into splt of the PLT entry for the TLS descriptor
|
||||
resolver. Special values are 0, if not necessary (or not found
|
||||
to be necessary yet), and -1 if needed but not determined
|
||||
@@ -2790,6 +2793,31 @@ elfNN_aarch64_copy_indirect_symbol (stru
|
||||
_bfd_elf_link_hash_copy_indirect (info, dir, ind);
|
||||
}
|
||||
|
||||
+/* Merge non-visibility st_other attributes. */
|
||||
+
|
||||
+static void
|
||||
+elfNN_aarch64_merge_symbol_attribute (struct elf_link_hash_entry *h,
|
||||
+ const Elf_Internal_Sym *isym,
|
||||
+ bfd_boolean definition ATTRIBUTE_UNUSED,
|
||||
+ bfd_boolean dynamic ATTRIBUTE_UNUSED)
|
||||
+{
|
||||
+ unsigned int isym_sto = isym->st_other & ~ELF_ST_VISIBILITY (-1);
|
||||
+ unsigned int h_sto = h->other & ~ELF_ST_VISIBILITY (-1);
|
||||
+
|
||||
+ if (isym_sto == h_sto)
|
||||
+ return;
|
||||
+
|
||||
+ if (isym_sto & ~STO_AARCH64_VARIANT_PCS)
|
||||
+ /* Not fatal, this callback cannot fail. */
|
||||
+ _bfd_error_handler (_("unknown attribute for symbol `%s': 0x%02x"),
|
||||
+ h->root.root.string, isym_sto);
|
||||
+
|
||||
+ /* Note: Ideally we would warn about any attribute mismatch, but
|
||||
+ this api does not allow that without substantial changes. */
|
||||
+ if (isym_sto & STO_AARCH64_VARIANT_PCS)
|
||||
+ h->other |= STO_AARCH64_VARIANT_PCS;
|
||||
+}
|
||||
+
|
||||
/* Destroy an AArch64 elf linker hash table. */
|
||||
|
||||
static void
|
||||
@@ -8370,6 +8398,12 @@ elfNN_aarch64_allocate_dynrelocs (struct
|
||||
updated. */
|
||||
|
||||
htab->root.srelplt->reloc_count++;
|
||||
+
|
||||
+ /* Mark the DSO in case R_<CLS>_JUMP_SLOT relocs against
|
||||
+ variant PCS symbols are present. */
|
||||
+ if (h->other & STO_AARCH64_VARIANT_PCS)
|
||||
+ htab->variant_pcs = 1;
|
||||
+
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -8958,6 +8992,10 @@ elfNN_aarch64_size_dynamic_sections (bfd
|
||||
|| !add_dynamic_entry (DT_JMPREL, 0))
|
||||
return FALSE;
|
||||
|
||||
+ if (htab->variant_pcs
|
||||
+ && !add_dynamic_entry (DT_AARCH64_VARIANT_PCS, 0))
|
||||
+ return FALSE;
|
||||
+
|
||||
if (htab->tlsdesc_plt
|
||||
&& (!add_dynamic_entry (DT_TLSDESC_PLT, 0)
|
||||
|| !add_dynamic_entry (DT_TLSDESC_GOT, 0)))
|
||||
@@ -9708,6 +9746,9 @@ const struct elf_size_info elfNN_aarch64
|
||||
#define elf_backend_copy_indirect_symbol \
|
||||
elfNN_aarch64_copy_indirect_symbol
|
||||
|
||||
+#define elf_backend_merge_symbol_attribute \
|
||||
+ elfNN_aarch64_merge_symbol_attribute
|
||||
+
|
||||
/* Create .dynbss, and .rela.bss sections in DYNOBJ, and set up shortcuts
|
||||
to them in our hash. */
|
||||
#define elf_backend_create_dynamic_sections \
|
||||
diff -rup binutils.orig/binutils/readelf.c binutils-2.32/binutils/readelf.c
|
||||
--- binutils.orig/binutils/readelf.c 2019-07-02 17:30:18.890896375 +0100
|
||||
+++ binutils-2.32/binutils/readelf.c 2019-07-02 17:32:25.008002901 +0100
|
||||
@@ -1797,6 +1797,19 @@ dump_relocations (Filedata * fi
|
||||
}
|
||||
|
||||
static const char *
|
||||
+get_aarch64_dynamic_type (unsigned long type)
|
||||
+{
|
||||
+ switch (type)
|
||||
+ {
|
||||
+ case DT_AARCH64_BTI_PLT: return "AARCH64_BTI_PLT";
|
||||
+ case DT_AARCH64_PAC_PLT: return "AARCH64_PAC_PLT";
|
||||
+ case DT_AARCH64_VARIANT_PCS: return "AARCH64_VARIANT_PCS";
|
||||
+ default:
|
||||
+ return NULL;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static const char *
|
||||
get_mips_dynamic_type (unsigned long type)
|
||||
{
|
||||
switch (type)
|
||||
@@ -2169,6 +2182,9 @@ get_dynamic_type (Filedata * filedata, u
|
||||
|
||||
switch (filedata->file_header.e_machine)
|
||||
{
|
||||
+ case EM_AARCH64:
|
||||
+ result = get_aarch64_dynamic_type (type);
|
||||
+ break;
|
||||
case EM_MIPS:
|
||||
case EM_MIPS_RS3_LE:
|
||||
result = get_mips_dynamic_type (type);
|
||||
@@ -11054,6 +11070,22 @@ get_solaris_symbol_visibility (unsigned
|
||||
}
|
||||
|
||||
static const char *
|
||||
+get_aarch64_symbol_other (unsigned int other)
|
||||
+{
|
||||
+ static char buf[32];
|
||||
+
|
||||
+ if (other & STO_AARCH64_VARIANT_PCS)
|
||||
+ {
|
||||
+ other &= ~STO_AARCH64_VARIANT_PCS;
|
||||
+ if (other == 0)
|
||||
+ return "VARIANT_PCS";
|
||||
+ snprintf (buf, sizeof buf, "VARIANT_PCS | %x", other);
|
||||
+ return buf;
|
||||
+ }
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+static const char *
|
||||
get_mips_symbol_other (unsigned int other)
|
||||
{
|
||||
switch (other)
|
||||
@@ -11164,6 +11196,9 @@ get_symbol_other (Filedata * filedata, u
|
||||
|
||||
switch (filedata->file_header.e_machine)
|
||||
{
|
||||
+ case EM_AARCH64:
|
||||
+ result = get_aarch64_symbol_other (other);
|
||||
+ break;
|
||||
case EM_MIPS:
|
||||
result = get_mips_symbol_other (other);
|
||||
break;
|
||||
diff -rup binutils.orig/gas/config/tc-aarch64.c binutils-2.32/gas/config/tc-aarch64.c
|
||||
--- binutils.orig/gas/config/tc-aarch64.c 2019-07-02 17:30:19.131894667 +0100
|
||||
+++ binutils-2.32/gas/config/tc-aarch64.c 2019-07-02 17:35:45.202584620 +0100
|
||||
@@ -1938,6 +1938,28 @@ s_aarch64_elf_cons (int nbytes)
|
||||
demand_empty_rest_of_line ();
|
||||
}
|
||||
|
||||
+/* Mark symbol that it follows a variant PCS convention. */
|
||||
+
|
||||
+static void
|
||||
+s_variant_pcs (int ignored ATTRIBUTE_UNUSED)
|
||||
+{
|
||||
+ char *name;
|
||||
+ char c;
|
||||
+ symbolS *sym;
|
||||
+ asymbol *bfdsym;
|
||||
+ elf_symbol_type *elfsym;
|
||||
+
|
||||
+ c = get_symbol_name (&name);
|
||||
+ if (!*name)
|
||||
+ as_bad (_("Missing symbol name in directive"));
|
||||
+ sym = symbol_find_or_make (name);
|
||||
+ restore_line_pointer (c);
|
||||
+ demand_empty_rest_of_line ();
|
||||
+ bfdsym = symbol_get_bfdsym (sym);
|
||||
+ elfsym = elf_symbol_from (bfd_asymbol_bfd (bfdsym), bfdsym);
|
||||
+ gas_assert (elfsym);
|
||||
+ elfsym->internal_elf_sym.st_other |= STO_AARCH64_VARIANT_PCS;
|
||||
+}
|
||||
#endif /* OBJ_ELF */
|
||||
|
||||
/* Output a 32-bit word, but mark as an instruction. */
|
||||
@@ -2084,6 +2106,7 @@ const pseudo_typeS md_pseudo_table[] = {
|
||||
{"long", s_aarch64_elf_cons, 4},
|
||||
{"xword", s_aarch64_elf_cons, 8},
|
||||
{"dword", s_aarch64_elf_cons, 8},
|
||||
+ {"variant_pcs", s_variant_pcs, 0},
|
||||
#endif
|
||||
{0, 0, 0}
|
||||
};
|
||||
@@ -9320,3 +9343,35 @@ aarch64_copy_symbol_attributes (symbolS
|
||||
{
|
||||
AARCH64_GET_FLAG (dest) = AARCH64_GET_FLAG (src);
|
||||
}
|
||||
+
|
||||
+#ifdef OBJ_ELF
|
||||
+/* Same as elf_copy_symbol_attributes, but without copying st_other.
|
||||
+ This is needed so AArch64 specific st_other values can be independently
|
||||
+ specified for an IFUNC resolver (that is called by the dynamic linker)
|
||||
+ and the symbol it resolves (aliased to the resolver). In particular,
|
||||
+ if a function symbol has special st_other value set via directives,
|
||||
+ then attaching an IFUNC resolver to that symbol should not override
|
||||
+ the st_other setting. Requiring the directive on the IFUNC resolver
|
||||
+ symbol would be unexpected and problematic in C code, where the two
|
||||
+ symbols appear as two independent function declarations. */
|
||||
+
|
||||
+void
|
||||
+aarch64_elf_copy_symbol_attributes (symbolS *dest, symbolS *src)
|
||||
+{
|
||||
+ struct elf_obj_sy *srcelf = symbol_get_obj (src);
|
||||
+ struct elf_obj_sy *destelf = symbol_get_obj (dest);
|
||||
+ if (srcelf->size)
|
||||
+ {
|
||||
+ if (destelf->size == NULL)
|
||||
+ destelf->size = XNEW (expressionS);
|
||||
+ *destelf->size = *srcelf->size;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ if (destelf->size != NULL)
|
||||
+ free (destelf->size);
|
||||
+ destelf->size = NULL;
|
||||
+ }
|
||||
+ S_SET_SIZE (dest, S_GET_SIZE (src));
|
||||
+}
|
||||
+#endif
|
||||
diff -rup binutils.orig/gas/config/tc-aarch64.h binutils-2.32/gas/config/tc-aarch64.h
|
||||
--- binutils.orig/gas/config/tc-aarch64.h 2019-07-02 17:30:19.136894632 +0100
|
||||
+++ binutils-2.32/gas/config/tc-aarch64.h 2019-07-02 17:35:45.202584620 +0100
|
||||
@@ -130,6 +130,12 @@ void aarch64_copy_symbol_attributes (sym
|
||||
(aarch64_copy_symbol_attributes (DEST, SRC))
|
||||
#endif
|
||||
|
||||
+#ifdef OBJ_ELF
|
||||
+void aarch64_elf_copy_symbol_attributes (symbolS *, symbolS *);
|
||||
+#define OBJ_COPY_SYMBOL_ATTRIBUTES(DEST, SRC) \
|
||||
+ aarch64_elf_copy_symbol_attributes (DEST, SRC)
|
||||
+#endif
|
||||
+
|
||||
#define TC_START_LABEL(STR, NUL_CHAR, NEXT_CHAR) \
|
||||
(NEXT_CHAR == ':' || (NEXT_CHAR == '/' && aarch64_data_in_code ()))
|
||||
#define tc_canonicalize_symbol_name(str) aarch64_canonicalize_symbol_name (str);
|
||||
diff -rup binutils.orig/gas/doc/c-aarch64.texi binutils-2.32/gas/doc/c-aarch64.texi
|
||||
--- binutils.orig/gas/doc/c-aarch64.texi 2019-07-02 17:30:19.125894710 +0100
|
||||
+++ binutils-2.32/gas/doc/c-aarch64.texi 2019-07-02 17:35:11.362824354 +0100
|
||||
@@ -425,6 +425,12 @@ should only be done if it is really nece
|
||||
|
||||
@c VVVVVVVVVVVVVVVVVVVVVVVVVV
|
||||
|
||||
+@cindex @code{.variant_pcs} directive, AArch64
|
||||
+@item .variant_pcs @var{symbol}
|
||||
+This directive marks @var{symbol} referencing a function that may
|
||||
+follow a variant procedure call standard with different register
|
||||
+usage convention from the base procedure call standard.
|
||||
+
|
||||
@c WWWWWWWWWWWWWWWWWWWWWWWWWW
|
||||
@c XXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
diff -rup binutils.orig/include/elf/aarch64.h binutils-2.32/include/elf/aarch64.h
|
||||
--- binutils.orig/include/elf/aarch64.h 2019-07-02 17:30:18.850896658 +0100
|
||||
+++ binutils-2.32/include/elf/aarch64.h 2019-07-02 17:32:55.678785616 +0100
|
||||
@@ -36,6 +36,15 @@
|
||||
#define SHF_COMDEF 0x80000000 /* Section may be multiply defined
|
||||
in the input to a link step. */
|
||||
|
||||
+/* Processor specific dynamic array tags. */
|
||||
+#define DT_AARCH64_BTI_PLT (DT_LOPROC + 1)
|
||||
+#define DT_AARCH64_PAC_PLT (DT_LOPROC + 3)
|
||||
+#define DT_AARCH64_VARIANT_PCS (DT_LOPROC + 5)
|
||||
+
|
||||
+/* AArch64-specific values for st_other. */
|
||||
+#define STO_AARCH64_VARIANT_PCS 0x80 /* Symbol may follow different call
|
||||
+ convention from the base PCS. */
|
||||
+
|
||||
/* Relocation types. */
|
||||
|
||||
START_RELOC_NUMBERS (elf_aarch64_reloc_type)
|
||||
diff -rup binutils.orig/ld/testsuite/ld-aarch64/aarch64-elf.exp binutils-2.32/ld/testsuite/ld-aarch64/aarch64-elf.exp
|
||||
--- binutils.orig/ld/testsuite/ld-aarch64/aarch64-elf.exp 2019-07-02 17:30:18.922896148 +0100
|
||||
+++ binutils-2.32/ld/testsuite/ld-aarch64/aarch64-elf.exp 2019-07-02 17:35:21.875749878 +0100
|
||||
@@ -371,6 +371,10 @@ run_dump_test_lp64 "rela-abs-relative-op
|
||||
|
||||
run_dump_test_lp64 "pie-bind-locally"
|
||||
|
||||
+run_dump_test_lp64 "variant_pcs-r"
|
||||
+run_dump_test_lp64 "variant_pcs-shared"
|
||||
+run_dump_test_lp64 "variant_pcs-now"
|
||||
+
|
||||
set aarch64elflinktests {
|
||||
{"ld-aarch64/so with global symbol" "-shared" "" "" {copy-reloc-so.s}
|
||||
{} "copy-reloc-so.so"}
|
||||
--- /dev/null 2019-07-02 08:01:33.386842704 +0100
|
||||
+++ binutils-2.32/gas/testsuite/gas/aarch64/symbol-variant_pcs-1.d 2019-07-02 17:35:11.362824354 +0100
|
||||
@@ -0,0 +1,10 @@
|
||||
+#objdump: -t
|
||||
+
|
||||
+.*: file format .*
|
||||
+
|
||||
+SYMBOL TABLE:
|
||||
+0+ l d \.text 0+ \.text
|
||||
+0+ l d \.data 0+ \.data
|
||||
+0+ l d \.bss 0+ \.bss
|
||||
+0+ l \.text 0+ func
|
||||
+0+ \*UND\* 0+ 0x80 foobar
|
||||
--- /dev/null 2019-07-02 08:01:33.386842704 +0100
|
||||
+++ binutils-2.32/gas/testsuite/gas/aarch64/symbol-variant_pcs-1.s 2019-07-02 17:35:11.362824354 +0100
|
||||
@@ -0,0 +1,8 @@
|
||||
+.text
|
||||
+.variant_pcs foobar
|
||||
+func:
|
||||
+ bl foobar
|
||||
+ b foobar
|
||||
+
|
||||
+.data
|
||||
+.xword foobar
|
||||
--- /dev/null 2019-07-02 08:01:33.386842704 +0100
|
||||
+++ binutils-2.32/gas/testsuite/gas/aarch64/symbol-variant_pcs-2.d 2019-07-02 17:35:11.362824354 +0100
|
||||
@@ -0,0 +1,9 @@
|
||||
+#objdump: -t
|
||||
+
|
||||
+.*: file format .*
|
||||
+
|
||||
+SYMBOL TABLE:
|
||||
+0+ l d \.text 0+ \.text
|
||||
+0+ l d \.data 0+ \.data
|
||||
+0+ l d \.bss 0+ \.bss
|
||||
+0+ l \.text 0+ 0x80 foo
|
||||
--- /dev/null 2019-07-02 08:01:33.386842704 +0100
|
||||
+++ binutils-2.32/gas/testsuite/gas/aarch64/symbol-variant_pcs-2.s 2019-07-02 17:35:11.362824354 +0100
|
||||
@@ -0,0 +1,4 @@
|
||||
+.text
|
||||
+.variant_pcs foo
|
||||
+foo:
|
||||
+ ret
|
||||
--- /dev/null 2019-07-02 08:01:33.386842704 +0100
|
||||
+++ binutils-2.32/gas/testsuite/gas/aarch64/symbol-variant_pcs-3.s 2019-07-02 17:35:45.202584620 +0100
|
||||
@@ -0,0 +1,20 @@
|
||||
+.text
|
||||
+.global foo_vpcs
|
||||
+.global foo_base
|
||||
+.global alias_vpcs
|
||||
+.global alias_base
|
||||
+
|
||||
+.variant_pcs foo_vpcs
|
||||
+.variant_pcs alias_vpcs
|
||||
+
|
||||
+foo_vpcs:
|
||||
+foo_base:
|
||||
+ bl foo_vpcs
|
||||
+ bl foo_base
|
||||
+ bl alias_vpcs
|
||||
+ bl alias_base
|
||||
+
|
||||
+/* Check that the STO_AARCH64_VARIANT_PCS is not affected by .set. */
|
||||
+
|
||||
+.set alias_base, foo_vpcs
|
||||
+.set alias_vpcs, foo_base
|
||||
--- /dev/null 2019-07-02 08:01:33.386842704 +0100
|
||||
+++ binutils-2.32/gas/testsuite/gas/aarch64/symbol-variant_pcs-3.d 2019-07-02 17:35:45.202584620 +0100
|
||||
@@ -0,0 +1,12 @@
|
||||
+#objdump: -t
|
||||
+
|
||||
+.*: file format .*
|
||||
+
|
||||
+SYMBOL TABLE:
|
||||
+0+ l d \.text 0+ \.text
|
||||
+0+ l d \.data 0+ \.data
|
||||
+0+ l d \.bss 0+ \.bss
|
||||
+0+ g \.text 0+ 0x80 foo_vpcs
|
||||
+0+ g \.text 0+ foo_base
|
||||
+0+ g \.text 0+ 0x80 alias_vpcs
|
||||
+0+ g \.text 0+ alias_base
|
||||
--- /dev/null 2019-07-02 08:01:33.386842704 +0100
|
||||
+++ binutils-2.32/ld/testsuite/ld-aarch64/variant_pcs-1.s 2019-07-02 17:35:21.875749878 +0100
|
||||
@@ -0,0 +1,59 @@
|
||||
+.text
|
||||
+
|
||||
+.variant_pcs f_spec_global_default_def
|
||||
+.variant_pcs f_spec_global_default_undef
|
||||
+.variant_pcs f_spec_global_hidden_def
|
||||
+.variant_pcs f_spec_local
|
||||
+.variant_pcs f_spec_global_default_ifunc
|
||||
+.variant_pcs f_spec_global_hidden_ifunc
|
||||
+.variant_pcs f_spec_local_ifunc
|
||||
+
|
||||
+.global f_spec_global_default_def
|
||||
+.global f_spec_global_default_undef
|
||||
+.global f_spec_global_hidden_def
|
||||
+.global f_spec_global_default_ifunc
|
||||
+.global f_spec_global_hidden_ifunc
|
||||
+.global f_base_global_default_def
|
||||
+.global f_base_global_default_undef
|
||||
+.global f_base_global_hidden_def
|
||||
+.global f_base_global_default_ifunc
|
||||
+.global f_base_global_hidden_ifunc
|
||||
+
|
||||
+.hidden f_spec_global_hidden_def
|
||||
+.hidden f_spec_global_hidden_ifunc
|
||||
+.hidden f_base_global_hidden_def
|
||||
+.hidden f_base_global_hidden_ifunc
|
||||
+
|
||||
+.type f_spec_global_default_ifunc, %gnu_indirect_function
|
||||
+.type f_spec_global_hidden_ifunc, %gnu_indirect_function
|
||||
+.type f_spec_local_ifunc, %gnu_indirect_function
|
||||
+.type f_base_global_default_ifunc, %gnu_indirect_function
|
||||
+.type f_base_global_hidden_ifunc, %gnu_indirect_function
|
||||
+.type f_base_local_ifunc, %gnu_indirect_function
|
||||
+
|
||||
+f_spec_global_default_def:
|
||||
+f_spec_global_hidden_def:
|
||||
+f_spec_local:
|
||||
+f_base_global_default_def:
|
||||
+f_base_global_hidden_def:
|
||||
+f_base_local:
|
||||
+f_spec_global_default_ifunc:
|
||||
+f_spec_global_hidden_ifunc:
|
||||
+f_spec_local_ifunc:
|
||||
+f_base_global_default_ifunc:
|
||||
+f_base_global_hidden_ifunc:
|
||||
+f_base_local_ifunc:
|
||||
+ bl f_spec_global_default_def
|
||||
+ bl f_spec_global_default_undef
|
||||
+ bl f_spec_global_hidden_def
|
||||
+ bl f_spec_local
|
||||
+ bl f_base_global_default_def
|
||||
+ bl f_base_global_default_undef
|
||||
+ bl f_base_global_hidden_def
|
||||
+ bl f_base_local
|
||||
+ bl f_spec_global_default_ifunc
|
||||
+ bl f_spec_global_hidden_ifunc
|
||||
+ bl f_spec_local_ifunc
|
||||
+ bl f_base_global_default_ifunc
|
||||
+ bl f_base_global_hidden_ifunc
|
||||
+ bl f_base_local_ifunc
|
||||
--- /dev/null 2019-07-02 08:01:33.386842704 +0100
|
||||
+++ binutils-2.32/ld/testsuite/ld-aarch64/variant_pcs-2.s 2019-07-02 17:35:21.875749878 +0100
|
||||
@@ -0,0 +1,47 @@
|
||||
+.text
|
||||
+
|
||||
+.variant_pcs f_spec_global_default_def
|
||||
+.variant_pcs f_spec_global_default_undef
|
||||
+.variant_pcs f_spec_global_hidden_def
|
||||
+.variant_pcs f_spec_local2
|
||||
+.variant_pcs f_spec_global_default_ifunc
|
||||
+.variant_pcs f_spec_global_hidden_ifunc
|
||||
+.variant_pcs f_spec_local2_ifunc
|
||||
+
|
||||
+.global f_spec_global_default_def
|
||||
+.global f_spec_global_default_undef
|
||||
+.global f_spec_global_hidden_def
|
||||
+.global f_spec_global_default_ifunc
|
||||
+.global f_spec_global_hidden_ifunc
|
||||
+.global f_base_global_default_def
|
||||
+.global f_base_global_default_undef
|
||||
+.global f_base_global_hidden_def
|
||||
+.global f_base_global_default_ifunc
|
||||
+.global f_base_global_hidden_ifunc
|
||||
+
|
||||
+.hidden f_spec_global_hidden_def
|
||||
+.hidden f_spec_global_hidden_ifunc
|
||||
+.hidden f_base_global_hidden_def
|
||||
+.hidden f_base_global_hidden_ifunc
|
||||
+
|
||||
+.type f_spec_local2_ifunc, %gnu_indirect_function
|
||||
+.type f_base_local2_ifunc, %gnu_indirect_function
|
||||
+
|
||||
+f_spec_local2:
|
||||
+f_base_local2:
|
||||
+f_spec_local2_ifunc:
|
||||
+f_base_local2_ifunc:
|
||||
+ bl f_spec_global_default_def
|
||||
+ bl f_spec_global_default_undef
|
||||
+ bl f_spec_global_hidden_def
|
||||
+ bl f_spec_local2
|
||||
+ bl f_base_global_default_def
|
||||
+ bl f_base_global_default_undef
|
||||
+ bl f_base_global_hidden_def
|
||||
+ bl f_base_local2
|
||||
+ bl f_spec_global_default_ifunc
|
||||
+ bl f_spec_global_hidden_ifunc
|
||||
+ bl f_spec_local2_ifunc
|
||||
+ bl f_base_global_default_ifunc
|
||||
+ bl f_base_global_hidden_ifunc
|
||||
+ bl f_base_local2_ifunc
|
||||
--- /dev/null 2019-07-02 08:01:33.386842704 +0100
|
||||
+++ binutils-2.32/ld/testsuite/ld-aarch64/variant_pcs.ld 2019-07-02 17:35:37.100642017 +0100
|
||||
@@ -0,0 +1,23 @@
|
||||
+/* Script for .variant_pcs symbol tests. */
|
||||
+OUTPUT_ARCH(aarch64)
|
||||
+ENTRY(_start)
|
||||
+SECTIONS
|
||||
+{
|
||||
+ /* Read-only sections, merged into text segment: */
|
||||
+ PROVIDE (__executable_start = 0x8000); . = 0x8000;
|
||||
+ .text :
|
||||
+ {
|
||||
+ *(.before)
|
||||
+ *(.text)
|
||||
+ *(.after)
|
||||
+ } =0
|
||||
+ . = 0x9000;
|
||||
+ .got : { *(.got) *(.got.plt)}
|
||||
+ . = 0x10000;
|
||||
+ .rela.dyn : { *(.rela.ifunc) }
|
||||
+ . = 0x11000;
|
||||
+ .rela.plt : { *(.rela.plt) *(.rela.iplt) }
|
||||
+ . = 0x12340000;
|
||||
+ .far : { *(.far) }
|
||||
+ .ARM.attributes 0 : { *(.ARM.atttributes) }
|
||||
+}
|
||||
--- /dev/null 2019-07-02 08:01:33.386842704 +0100
|
||||
+++ binutils-2.32/ld/testsuite/ld-aarch64/variant_pcs-now.d 2019-07-02 17:34:37.557063849 +0100
|
||||
@@ -0,0 +1,67 @@
|
||||
+#source: variant_pcs-1.s
|
||||
+#source: variant_pcs-2.s
|
||||
+#ld: -shared --hash-style=sysv -T variant_pcs.ld -z now
|
||||
+#readelf: -rsW
|
||||
+
|
||||
+Relocation section '\.rela\.plt' at offset 0x11000 contains 12 entries:
|
||||
+ Offset Info Type Symbol's Value Symbol's Name \+ Addend
|
||||
+0000000000009020 0000000100000402 R_AARCH64_JUMP_SLOT 0000000000000000 f_base_global_default_undef \+ 0
|
||||
+0000000000009028 0000000200000402 R_AARCH64_JUMP_SLOT 0000000000000000 f_spec_global_default_undef \+ 0
|
||||
+0000000000009030 0000000400000402 R_AARCH64_JUMP_SLOT 0000000000008000 f_base_global_default_def \+ 0
|
||||
+0000000000009038 0000000500000402 R_AARCH64_JUMP_SLOT 0000000000008000 f_spec_global_default_def \+ 0
|
||||
+0000000000009040 0000000000000408 R_AARCH64_IRELATIVE 8000
|
||||
+0000000000009048 0000000300000402 R_AARCH64_JUMP_SLOT f_spec_global_default_ifunc\(\) f_spec_global_default_ifunc \+ 0
|
||||
+0000000000009050 0000000000000408 R_AARCH64_IRELATIVE 8000
|
||||
+0000000000009058 0000000600000402 R_AARCH64_JUMP_SLOT f_base_global_default_ifunc\(\) f_base_global_default_ifunc \+ 0
|
||||
+0000000000009060 0000000000000408 R_AARCH64_IRELATIVE 8038
|
||||
+0000000000009068 0000000000000408 R_AARCH64_IRELATIVE 8000
|
||||
+0000000000009070 0000000000000408 R_AARCH64_IRELATIVE 8000
|
||||
+0000000000009078 0000000000000408 R_AARCH64_IRELATIVE 8038
|
||||
+
|
||||
+Symbol table '\.dynsym' contains 7 entries:
|
||||
+ Num: Value Size Type Bind Vis Ndx Name
|
||||
+ 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
|
||||
+ 1: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_base_global_default_undef
|
||||
+ 2: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] UND f_spec_global_default_undef
|
||||
+ 3: 0000000000008000 0 IFUNC GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_ifunc
|
||||
+ 4: 0000000000008000 0 NOTYPE GLOBAL DEFAULT 1 f_base_global_default_def
|
||||
+ 5: 0000000000008000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_def
|
||||
+ 6: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc
|
||||
+
|
||||
+Symbol table '\.symtab' contains 35 entries:
|
||||
+ Num: Value Size Type Bind Vis Ndx Name
|
||||
+ 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
|
||||
+ 1: 0000000000008000 0 SECTION LOCAL DEFAULT 1
|
||||
+ 2: 0000000000008070 0 SECTION LOCAL DEFAULT 2
|
||||
+ 3: 0000000000009000 0 SECTION LOCAL DEFAULT 3
|
||||
+ 4: 0000000000009080 0 SECTION LOCAL DEFAULT 4
|
||||
+ 5: 0000000000011000 0 SECTION LOCAL DEFAULT 5
|
||||
+ 6: 0000000000011120 0 SECTION LOCAL DEFAULT 6
|
||||
+ 7: 00000000000111c8 0 SECTION LOCAL DEFAULT 7
|
||||
+ 8: 0000000000011270 0 SECTION LOCAL DEFAULT 8
|
||||
+ 9: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-1\.o
|
||||
+ 10: 0000000000008000 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local
|
||||
+ 11: 0000000000008000 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local_ifunc
|
||||
+ 12: 0000000000008000 0 IFUNC LOCAL DEFAULT 1 f_base_local_ifunc
|
||||
+ 13: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 f_base_local
|
||||
+ 14: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 \$x
|
||||
+ 15: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-2\.o
|
||||
+ 16: 0000000000008038 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local2
|
||||
+ 17: 0000000000008038 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local2_ifunc
|
||||
+ 18: 0000000000008038 0 IFUNC LOCAL DEFAULT 1 f_base_local2_ifunc
|
||||
+ 19: 0000000000008038 0 NOTYPE LOCAL DEFAULT 1 f_base_local2
|
||||
+ 20: 0000000000008038 0 NOTYPE LOCAL DEFAULT 1 \$x
|
||||
+ 21: 0000000000000000 0 FILE LOCAL DEFAULT ABS
|
||||
+ 22: 0000000000009080 0 OBJECT LOCAL DEFAULT ABS _DYNAMIC
|
||||
+ 23: 0000000000008000 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_hidden_def
|
||||
+ 24: 0000000000008000 0 IFUNC LOCAL DEFAULT 1 f_base_global_hidden_ifunc
|
||||
+ 25: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 f_base_global_hidden_def
|
||||
+ 26: 0000000000009000 0 OBJECT LOCAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_
|
||||
+ 27: 0000000000008000 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_hidden_ifunc
|
||||
+ 28: 0000000000008070 0 NOTYPE LOCAL DEFAULT 2 \$x
|
||||
+ 29: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_base_global_default_undef
|
||||
+ 30: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] UND f_spec_global_default_undef
|
||||
+ 31: 0000000000008000 0 IFUNC GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_ifunc
|
||||
+ 32: 0000000000008000 0 NOTYPE GLOBAL DEFAULT 1 f_base_global_default_def
|
||||
+ 33: 0000000000008000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_def
|
||||
+ 34: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc
|
||||
--- /dev/null 2019-07-02 08:01:33.386842704 +0100
|
||||
+++ binutils-2.32/ld/testsuite/ld-aarch64/variant_pcs-r.d 2019-07-02 17:35:35.244655166 +0100
|
||||
@@ -0,0 +1,60 @@
|
||||
+#source: variant_pcs-1.s
|
||||
+#source: variant_pcs-2.s
|
||||
+#ld: -r
|
||||
+#readelf: -rsW
|
||||
+
|
||||
+Relocation section '\.rela\.text' at offset .* contains 24 entries:
|
||||
+ Offset Info Type Symbol's Value Symbol's Name \+ Addend
|
||||
+0000000000000000 000000180000011b R_AARCH64_CALL26 0000000000000000 f_spec_global_default_def \+ 0
|
||||
+0000000000000004 000000110000011b R_AARCH64_CALL26 0000000000000000 f_spec_global_default_undef \+ 0
|
||||
+0000000000000008 000000120000011b R_AARCH64_CALL26 0000000000000000 f_spec_global_hidden_def \+ 0
|
||||
+0000000000000010 000000170000011b R_AARCH64_CALL26 0000000000000000 f_base_global_default_def \+ 0
|
||||
+0000000000000014 000000100000011b R_AARCH64_CALL26 0000000000000000 f_base_global_default_undef \+ 0
|
||||
+0000000000000018 000000150000011b R_AARCH64_CALL26 0000000000000000 f_base_global_hidden_def \+ 0
|
||||
+0000000000000020 000000140000011b R_AARCH64_CALL26 f_spec_global_default_ifunc\(\) f_spec_global_default_ifunc \+ 0
|
||||
+0000000000000024 000000160000011b R_AARCH64_CALL26 f_spec_global_hidden_ifunc\(\) f_spec_global_hidden_ifunc \+ 0
|
||||
+0000000000000028 000000060000011b R_AARCH64_CALL26 f_spec_local_ifunc\(\) f_spec_local_ifunc \+ 0
|
||||
+000000000000002c 000000190000011b R_AARCH64_CALL26 f_base_global_default_ifunc\(\) f_base_global_default_ifunc \+ 0
|
||||
+0000000000000030 000000130000011b R_AARCH64_CALL26 f_base_global_hidden_ifunc\(\) f_base_global_hidden_ifunc \+ 0
|
||||
+0000000000000034 000000070000011b R_AARCH64_CALL26 f_base_local_ifunc\(\) f_base_local_ifunc \+ 0
|
||||
+0000000000000038 000000180000011b R_AARCH64_CALL26 0000000000000000 f_spec_global_default_def \+ 0
|
||||
+000000000000003c 000000110000011b R_AARCH64_CALL26 0000000000000000 f_spec_global_default_undef \+ 0
|
||||
+0000000000000040 000000120000011b R_AARCH64_CALL26 0000000000000000 f_spec_global_hidden_def \+ 0
|
||||
+0000000000000048 000000170000011b R_AARCH64_CALL26 0000000000000000 f_base_global_default_def \+ 0
|
||||
+000000000000004c 000000100000011b R_AARCH64_CALL26 0000000000000000 f_base_global_default_undef \+ 0
|
||||
+0000000000000050 000000150000011b R_AARCH64_CALL26 0000000000000000 f_base_global_hidden_def \+ 0
|
||||
+0000000000000058 000000140000011b R_AARCH64_CALL26 f_spec_global_default_ifunc\(\) f_spec_global_default_ifunc \+ 0
|
||||
+000000000000005c 000000160000011b R_AARCH64_CALL26 f_spec_global_hidden_ifunc\(\) f_spec_global_hidden_ifunc \+ 0
|
||||
+0000000000000060 0000000c0000011b R_AARCH64_CALL26 f_spec_local2_ifunc\(\) f_spec_local2_ifunc \+ 0
|
||||
+0000000000000064 000000190000011b R_AARCH64_CALL26 f_base_global_default_ifunc\(\) f_base_global_default_ifunc \+ 0
|
||||
+0000000000000068 000000130000011b R_AARCH64_CALL26 f_base_global_hidden_ifunc\(\) f_base_global_hidden_ifunc \+ 0
|
||||
+000000000000006c 0000000d0000011b R_AARCH64_CALL26 f_base_local2_ifunc\(\) f_base_local2_ifunc \+ 0
|
||||
+
|
||||
+Symbol table '\.symtab' contains 26 entries:
|
||||
+ Num: Value Size Type Bind Vis Ndx Name
|
||||
+ 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
|
||||
+ 1: 0000000000000000 0 SECTION LOCAL DEFAULT 1
|
||||
+ 2: 0000000000000000 0 SECTION LOCAL DEFAULT 3
|
||||
+ 3: 0000000000000000 0 SECTION LOCAL DEFAULT 4
|
||||
+ 4: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-1\.o
|
||||
+ 5: 0000000000000000 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local
|
||||
+ 6: 0000000000000000 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local_ifunc
|
||||
+ 7: 0000000000000000 0 IFUNC LOCAL DEFAULT 1 f_base_local_ifunc
|
||||
+ 8: 0000000000000000 0 NOTYPE LOCAL DEFAULT 1 f_base_local
|
||||
+ 9: 0000000000000000 0 NOTYPE LOCAL DEFAULT 1 \$x
|
||||
+ 10: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-2\.o
|
||||
+ 11: 0000000000000038 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local2
|
||||
+ 12: 0000000000000038 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local2_ifunc
|
||||
+ 13: 0000000000000038 0 IFUNC LOCAL DEFAULT 1 f_base_local2_ifunc
|
||||
+ 14: 0000000000000038 0 NOTYPE LOCAL DEFAULT 1 f_base_local2
|
||||
+ 15: 0000000000000038 0 NOTYPE LOCAL DEFAULT 1 \$x
|
||||
+ 16: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_base_global_default_undef
|
||||
+ 17: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] UND f_spec_global_default_undef
|
||||
+ 18: 0000000000000000 0 NOTYPE GLOBAL HIDDEN \[VARIANT_PCS\] 1 f_spec_global_hidden_def
|
||||
+ 19: 0000000000000000 0 IFUNC GLOBAL HIDDEN 1 f_base_global_hidden_ifunc
|
||||
+ 20: 0000000000000000 0 IFUNC GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_ifunc
|
||||
+ 21: 0000000000000000 0 NOTYPE GLOBAL HIDDEN 1 f_base_global_hidden_def
|
||||
+ 22: 0000000000000000 0 IFUNC GLOBAL HIDDEN \[VARIANT_PCS\] 1 f_spec_global_hidden_ifunc
|
||||
+ 23: 0000000000000000 0 NOTYPE GLOBAL DEFAULT 1 f_base_global_default_def
|
||||
+ 24: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_def
|
||||
+ 25: 0000000000000000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc
|
||||
--- /dev/null 2019-07-02 08:01:33.386842704 +0100
|
||||
+++ binutils-2.32/ld/testsuite/ld-aarch64/variant_pcs-shared.d 2019-07-02 17:34:45.635006622 +0100
|
||||
@@ -0,0 +1,67 @@
|
||||
+#source: variant_pcs-1.s
|
||||
+#source: variant_pcs-2.s
|
||||
+#ld: -shared --hash-style=sysv -T variant_pcs.ld
|
||||
+#readelf: -rsW
|
||||
+
|
||||
+Relocation section '\.rela\.plt' at offset 0x11000 contains 12 entries:
|
||||
+ Offset Info Type Symbol's Value Symbol's Name \+ Addend
|
||||
+0000000000009020 0000000100000402 R_AARCH64_JUMP_SLOT 0000000000000000 f_base_global_default_undef \+ 0
|
||||
+0000000000009028 0000000200000402 R_AARCH64_JUMP_SLOT 0000000000000000 f_spec_global_default_undef \+ 0
|
||||
+0000000000009030 0000000400000402 R_AARCH64_JUMP_SLOT 0000000000008000 f_base_global_default_def \+ 0
|
||||
+0000000000009038 0000000500000402 R_AARCH64_JUMP_SLOT 0000000000008000 f_spec_global_default_def \+ 0
|
||||
+0000000000009040 0000000000000408 R_AARCH64_IRELATIVE 8000
|
||||
+0000000000009048 0000000300000402 R_AARCH64_JUMP_SLOT f_spec_global_default_ifunc\(\) f_spec_global_default_ifunc \+ 0
|
||||
+0000000000009050 0000000000000408 R_AARCH64_IRELATIVE 8000
|
||||
+0000000000009058 0000000600000402 R_AARCH64_JUMP_SLOT f_base_global_default_ifunc\(\) f_base_global_default_ifunc \+ 0
|
||||
+0000000000009060 0000000000000408 R_AARCH64_IRELATIVE 8038
|
||||
+0000000000009068 0000000000000408 R_AARCH64_IRELATIVE 8000
|
||||
+0000000000009070 0000000000000408 R_AARCH64_IRELATIVE 8000
|
||||
+0000000000009078 0000000000000408 R_AARCH64_IRELATIVE 8038
|
||||