import gcc-toolset-10-binutils-2.32-19.el8

This commit is contained in:
CentOS Sources 2020-06-09 19:29:33 +00:00 committed by Andrew Lukoshko
commit f333adab66
43 changed files with 10931 additions and 0 deletions

View File

@ -0,0 +1,2 @@
cd45a512af1c8a508976c1beb4f5825b3bb89f4d SOURCES/binutils-2.32.tar.xz
d3e5c9fc829ed40648110da6fe46c2fb1ed8aadb SOURCES/standards.info.gz

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
SOURCES/binutils-2.32.tar.xz
SOURCES/standards.info.gz

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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;
}

View File

@ -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

View File

@ -0,0 +1,17 @@
--- binutils.orig/bfd/elfcode.h 2020-05-13 11:18:04.792779506 +0100
+++ binutils-2.32/bfd/elfcode.h 2020-05-13 11:19:36.270101134 +0100
@@ -750,12 +750,9 @@ elf_object_p (bfd *abfd)
!= 0))
abfd->flags &= ~D_PAGED;
}
- }
- /* A further sanity check. */
- if (i_ehdrp->e_shnum != 0)
- {
- if (i_ehdrp->e_shstrndx >= elf_numsections (abfd))
+ if (i_ehdrp->e_shstrndx >= elf_numsections (abfd)
+ || i_shdrp[i_ehdrp->e_shstrndx].sh_type != SHT_STRTAB)
{
/* PR 2257:
We used to just goto got_wrong_format_error here

View File

@ -0,0 +1,17 @@
--- binutils.orig/libiberty/simple-object-elf.c 2019-08-09 14:13:51.677330065 +0100
+++ binutils-2.32/libiberty/simple-object-elf.c 2019-08-09 14:14:31.177076298 +0100
@@ -549,6 +549,14 @@ simple_object_elf_match (unsigned char h
return NULL;
}
+ if (eor->shstrndx == 0)
+ {
+ *errmsg = "invalid ELF shstrndx == 0";
+ *err = 0;
+ XDELETE (eor);
+ return NULL;
+ }
+
return (void *) eor;
}

View File

@ -0,0 +1,11 @@
--- binutils.orig/binutils/readelf.c 2019-08-13 10:03:33.518792590 +0100
+++ binutils-2.32/binutils/readelf.c 2019-08-13 10:04:22.885418269 +0100
@@ -13234,7 +13234,7 @@ apply_relocations (Filedata *
}
rloc = start + rp->r_offset;
- if ((rloc + reloc_size) > end || (rloc < start))
+ if (rloc >= end || (rloc + reloc_size) > end || (rloc < start))
{
warn (_("skipping invalid relocation offset 0x%lx in section %s\n"),
(unsigned long) rp->r_offset,

View File

@ -0,0 +1,62 @@
--- binutils.orig/bfd/dwarf2.c 2019-11-13 11:49:52.211121564 +0000
+++ binutils-2.33.1/bfd/dwarf2.c 2019-11-13 11:53:26.991423055 +0000
@@ -2813,8 +2813,8 @@ static bfd_boolean comp_unit_maybe_decod
static bfd_boolean
find_abstract_instance (struct comp_unit * unit,
- bfd_byte * orig_info_ptr,
struct attribute * attr_ptr,
+ unsigned int recur_count,
const char ** pname,
bfd_boolean * is_linkage,
char ** filename_ptr,
@@ -2829,6 +2829,14 @@ find_abstract_instance (struct comp_unit
struct attribute attr;
const char *name = NULL;
+ if (recur_count == 100)
+ {
+ _bfd_error_handler
+ (_("DWARF error: abstract instance recursion detected"));
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
+
/* DW_FORM_ref_addr can reference an entry in a different CU. It
is an offset from the .debug_info section, not the current CU. */
if (attr_ptr->form == DW_FORM_ref_addr)
@@ -2962,15 +2970,7 @@ find_abstract_instance (struct comp_unit
info_ptr, info_ptr_end);
if (info_ptr == NULL)
break;
- /* It doesn't ever make sense for DW_AT_specification to
- refer to the same DIE. Stop simple recursion. */
- if (info_ptr == orig_info_ptr)
- {
- _bfd_error_handler
- (_("DWARF error: abstract instance recursion detected"));
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
- }
+
switch (attr.name)
{
case DW_AT_name:
@@ -2984,7 +2984,7 @@ find_abstract_instance (struct comp_unit
}
break;
case DW_AT_specification:
- if (!find_abstract_instance (unit, info_ptr, &attr,
+ if (!find_abstract_instance (unit, &attr, recur_count + 1,
&name, is_linkage,
filename_ptr, linenumber_ptr))
return FALSE;
@@ -3200,7 +3200,7 @@ scan_unit_for_symbols (struct comp_unit
case DW_AT_abstract_origin:
case DW_AT_specification:
- if (!find_abstract_instance (unit, info_ptr, &attr,
+ if (!find_abstract_instance (unit, &attr, 0,
&func->name,
&func->is_linkage,
&func->file,

View File

@ -0,0 +1,20 @@
--- binutils.orig/bfd/dwarf2.c 2019-11-13 11:32:09.395430104 +0000
+++ binutils-2.33.1/bfd/dwarf2.c 2019-11-13 11:33:17.272899503 +0000
@@ -4440,7 +4440,16 @@ _bfd_dwarf2_slurp_debug_info (bfd *abfd,
for (total_size = 0;
msec;
msec = find_debug_info (debug_bfd, debug_sections, msec))
- total_size += msec->size;
+ {
+ /* Catch PR25070 testcase overflowing size calculation here. */
+ if (total_size + msec->size < total_size
+ || total_size + msec->size < msec->size)
+ {
+ bfd_set_error (bfd_error_no_memory);
+ return FALSE;
+ }
+ total_size += msec->size;
+ }
stash->info_ptr_memory = (bfd_byte *) bfd_malloc (total_size);
if (stash->info_ptr_memory == NULL)

View File

@ -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;

View File

@ -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

View File

@ -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]);

View File

@ -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);

View File

@ -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)

View File

@ -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.

View File

@ -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
+
+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
--- binutils.orig/bfd/archive.c 2019-07-03 10:06:20.527408416 +0100
+++ binutils-2.32/bfd/archive.c 2019-07-03 10:06:57.887142988 +0100
@@ -1076,8 +1076,6 @@ do_slurp_coff_armap (bfd *abfd)
*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;
diff -rup binutils.orig/ld/testsuite/ld-aarch64/variant_pcs-now.d binutils-2.32/ld/testsuite/ld-aarch64/variant_pcs-now.d
--- binutils.orig/ld/testsuite/ld-aarch64/variant_pcs-now.d 2019-07-03 10:06:20.012412075 +0100
+++ binutils-2.32/ld/testsuite/ld-aarch64/variant_pcs-now.d 2019-07-03 10:20:51.959203582 +0100
@@ -22,10 +22,10 @@ Symbol table '\.dynsym' contains 7 entri
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
+ 2: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_spec_global_default_undef \[VARIANT_PCS\]
+ 3: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_spec_global_default_ifunc \[VARIANT_PCS\]
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
+ 5: 0000000000008000 0 NOTYPE GLOBAL DEFAULT 1 f_spec_global_default_def \[VARIANT_PCS\]
6: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc
Symbol table '\.symtab' contains 35 entries:
@@ -40,28 +40,28 @@ Symbol table '\.symtab' contains 35 entr
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
+ 10: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 f_spec_local \[VARIANT_PCS\]
+ 11: 0000000000008000 0 IFUNC LOCAL DEFAULT 1 f_spec_local_ifunc \[VARIANT_PCS\]
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
+ 16: 0000000000008038 0 NOTYPE LOCAL DEFAULT 1 f_spec_local2 \[VARIANT_PCS\]
+ 17: 0000000000008038 0 IFUNC LOCAL DEFAULT 1 f_spec_local2_ifunc \[VARIANT_PCS\]
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
+ 23: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 f_spec_global_hidden_def \[VARIANT_PCS\]
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
+ 27: 0000000000008000 0 IFUNC LOCAL DEFAULT 1 f_spec_global_hidden_ifunc \[VARIANT_PCS\]
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
+ 30: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_spec_global_default_undef \[VARIANT_PCS\]
+ 31: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_spec_global_default_ifunc \[VARIANT_PCS\]
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
+ 33: 0000000000008000 0 NOTYPE GLOBAL DEFAULT 1 f_spec_global_default_def \[VARIANT_PCS\]
34: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc
diff -rup binutils.orig/ld/testsuite/ld-aarch64/variant_pcs-r.d binutils-2.32/ld/testsuite/ld-aarch64/variant_pcs-r.d
--- binutils.orig/ld/testsuite/ld-aarch64/variant_pcs-r.d 2019-07-03 10:06:20.012412075 +0100
+++ binutils-2.32/ld/testsuite/ld-aarch64/variant_pcs-r.d 2019-07-03 10:14:28.152933189 +0100
@@ -37,24 +37,24 @@ Symbol table '\.symtab' contains 26 entr
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
+ 5: 0000000000000000 0 NOTYPE LOCAL DEFAULT 1 f_spec_local \[VARIANT_PCS\]
+ 6: 0000000000000000 0 IFUNC LOCAL DEFAULT 1 f_spec_local_ifunc \[VARIANT_PCS\]
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
+ 11: 0000000000000038 0 NOTYPE LOCAL DEFAULT 1 f_spec_local2 \[VARIANT_PCS\]
+ 12: 0000000000000038 0 IFUNC LOCAL DEFAULT 1 f_spec_local2_ifunc \[VARIANT_PCS\]
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
+ 17: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_spec_global_default_undef \[VARIANT_PCS\]
+ 18: 0000000000000000 0 NOTYPE GLOBAL HIDDEN 1 f_spec_global_hidden_def \[VARIANT_PCS\]
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
+ 20: 0000000000000000 0 IFUNC GLOBAL DEFAULT 1 f_spec_global_default_ifunc \[VARIANT_PCS\]
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
+ 22: 0000000000000000 0 IFUNC GLOBAL HIDDEN 1 f_spec_global_hidden_ifunc \[VARIANT_PCS\]
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
+ 24: 0000000000000000 0 NOTYPE GLOBAL DEFAULT 1 f_spec_global_default_def \[VARIANT_PCS\]
25: 0000000000000000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc
diff -rup binutils.orig/ld/testsuite/ld-aarch64/variant_pcs-shared.d binutils-2.32/ld/testsuite/ld-aarch64/variant_pcs-shared.d
--- binutils.orig/ld/testsuite/ld-aarch64/variant_pcs-shared.d 2019-07-03 10:06:20.012412075 +0100
+++ binutils-2.32/ld/testsuite/ld-aarch64/variant_pcs-shared.d 2019-07-03 10:19:00.760994532 +0100
@@ -22,10 +22,10 @@ Symbol table '\.dynsym' contains 7 entri
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
+ 2: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_spec_global_default_undef \[VARIANT_PCS\]
+ 3: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_spec_global_default_ifunc \[VARIANT_PCS\]
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
+ 5: 0000000000008000 0 NOTYPE GLOBAL DEFAULT 1 f_spec_global_default_def \[VARIANT_PCS\]
6: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc
Symbol table '\.symtab' contains 35 entries:
@@ -40,28 +40,28 @@ Symbol table '\.symtab' contains 35 entr
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
+ 10: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 f_spec_local \[VARIANT_PCS\]
+ 11: 0000000000008000 0 IFUNC LOCAL DEFAULT 1 f_spec_local_ifunc \[VARIANT_PCS\]
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
+ 16: 0000000000008038 0 NOTYPE LOCAL DEFAULT 1 f_spec_local2 \[VARIANT_PCS\]
+ 17: 0000000000008038 0 IFUNC LOCAL DEFAULT 1 f_spec_local2_ifunc \[VARIANT_PCS\]
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
+ 23: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 f_spec_global_hidden_def \[VARIANT_PCS\]
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
+ 27: 0000000000008000 0 IFUNC LOCAL DEFAULT 1 f_spec_global_hidden_ifunc \[VARIANT_PCS\]
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
+ 30: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_spec_global_default_undef \[VARIANT_PCS\]
+ 31: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_spec_global_default_ifunc \[VARIANT_PCS\]
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
+ 33: 0000000000008000 0 NOTYPE GLOBAL DEFAULT 1 f_spec_global_default_def \[VARIANT_PCS\]
34: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc

View File

@ -0,0 +1,20 @@
--- binutils.orig/gold/aarch64.cc 2019-05-21 11:24:07.642560743 +0100
+++ binutils-2.32/gold/aarch64.cc 2019-05-21 11:25:02.425157682 +0100
@@ -6496,6 +6496,17 @@ Target_aarch64<size, big_endian>::Scan::
gold_error(_("%s: unsupported reloc %u in pos independent link."),
object->name().c_str(), r_type);
}
+ // Make a PLT entry if necessary.
+ if (gsym->needs_plt_entry())
+ {
+ target->make_plt_entry(symtab, layout, gsym);
+ // Since this is not a PC-relative relocation, we may be
+ // taking the address of a function. In that case we need to
+ // set the entry in the dynamic symbol table to the address of
+ // the PLT entry.
+ if (gsym->is_from_dynobj() && !parameters->options().shared())
+ gsym->set_needs_dynsym_value();
+ }
break;
case elfcpp::R_AARCH64_LD_PREL_LO19: // 273

View File

@ -0,0 +1,68 @@
diff -rup binutils.orig/gas/config/obj-elf.c binutils-2.30/gas/config/obj-elf.c
--- binutils.orig/gas/config/obj-elf.c 2018-09-24 17:50:06.974172867 +0100
+++ binutils-2.30/gas/config/obj-elf.c 2018-09-25 15:19:33.559830794 +0100
@@ -82,9 +82,11 @@ static void obj_elf_gnu_attribute (int);
static void obj_elf_tls_common (int);
static void obj_elf_lcomm (int);
static void obj_elf_struct (int);
+static void obj_elf_attach_to_group (int);
static const pseudo_typeS elf_pseudo_table[] =
{
+ {"attach_to_group", obj_elf_attach_to_group, 0},
{"comm", obj_elf_common, 0},
{"common", obj_elf_common, 1},
{"ident", obj_elf_ident, 0},
@@ -1007,6 +1009,27 @@ obj_elf_section_name (void)
return name;
}
+static void
+obj_elf_attach_to_group (int dummy ATTRIBUTE_UNUSED)
+{
+ const char * gname = obj_elf_section_name ();
+
+ if (gname == NULL)
+ {
+ as_warn ("group name not parseable");
+ return;
+ }
+
+ if (elf_group_name (now_seg))
+ {
+ as_warn ("already has a group");
+ return;
+ }
+
+ elf_group_name (now_seg) = xstrdup (gname);
+ elf_section_flags (now_seg) |= SHF_GROUP;
+}
+
void
obj_elf_section (int push)
{
diff -rup binutils.orig/gas/doc/as.texinfo binutils-2.30/gas/doc/as.texinfo
--- binutils.orig/gas/doc/as.texi 2018-09-24 17:50:06.984172788 +0100
+++ binutils-2.30/gas/doc/as.texi 2018-09-25 15:19:43.557748972 +0100
@@ -4407,6 +4407,7 @@ Some machine configurations provide addi
* Altmacro:: @code{.altmacro}
* Ascii:: @code{.ascii "@var{string}"}@dots{}
* Asciz:: @code{.asciz "@var{string}"}@dots{}
+* Attach_to_group:: @code{.attach_to_group @var{name}}
* Balign:: @code{.balign @var{abs-expr} , @var{abs-expr}}
* Bundle directives:: @code{.bundle_align_mode @var{abs-expr}}, etc
* Byte:: @code{.byte @var{expressions}}
@@ -4703,6 +4704,12 @@ trailing zero byte) into consecutive add
@code{.asciz} is just like @code{.ascii}, but each string is followed by
a zero byte. The ``z'' in @samp{.asciz} stands for ``zero''.
+@node Attach_to_group
+@section @code{.attach_to_group @var{name}}
+Attaches the current section to the named group. This is like declaring
+the section with the @code{G} attribute, but can be done after the section
+has been created.
+
@node Balign
@section @code{.balign[wl] @var{abs-expr}, @var{abs-expr}, @var{abs-expr}}

View File

@ -0,0 +1,39 @@
diff -rup binutils.orig/bfd/coffgen.c binutils-2.31.1/bfd/coffgen.c
--- binutils.orig/bfd/coffgen.c 2019-03-06 08:49:19.500586870 +0000
+++ binutils-2.31.1/bfd/coffgen.c 2019-03-06 08:49:45.798394582 +0000
@@ -2289,7 +2289,7 @@ coff_find_nearest_line_with_names (bfd *
information. So try again, using a bias against the address sought. */
if (coff_data (abfd)->dwarf2_find_line_info != NULL)
{
- bfd_signed_vma bias;
+ bfd_signed_vma bias = 0;
/* Create a cache of the result for the next call. */
if (sec_data == NULL && section->owner == abfd)
@@ -2301,10 +2301,11 @@ coff_find_nearest_line_with_names (bfd *
if (sec_data != NULL && sec_data->saved_bias)
bias = sec_data->saved_bias;
- else
+ else if (symbols)
{
bias = _bfd_dwarf2_find_symbol_bias (symbols,
& coff_data (abfd)->dwarf2_find_line_info);
+
if (sec_data)
{
sec_data->saved_bias = TRUE;
Only in binutils-2.31.1/bfd: coffgen.c.orig
diff -rup binutils.orig/bfd/dwarf2.c binutils-2.31.1/bfd/dwarf2.c
--- binutils.orig/bfd/dwarf2.c 2019-03-06 08:49:19.498586884 +0000
+++ binutils-2.31.1/bfd/dwarf2.c 2019-03-06 08:49:45.799394575 +0000
@@ -4463,7 +4463,7 @@ _bfd_dwarf2_find_symbol_bias (asymbol **
stash = (struct dwarf2_debug *) *pinfo;
- if (stash == NULL)
+ if (stash == NULL || symbols == NULL)
return 0;
for (unit = stash->all_comp_units; unit; unit = unit->next_unit)
Only in binutils-2.31.1/bfd: dwarf2.c.orig

View File

@ -0,0 +1,83 @@
diff -rup binutils.orig/configure binutils-2.30/configure
--- binutils.orig/configure 2018-09-24 17:50:06.967172922 +0100
+++ binutils-2.30/configure 2018-09-24 17:51:16.648624865 +0100
@@ -4996,49 +4996,6 @@ if test -z "$LD"; then
fi
fi
-# Check whether -static-libstdc++ -static-libgcc is supported.
-have_static_libs=no
-if test "$GCC" = yes; then
- saved_LDFLAGS="$LDFLAGS"
-
- LDFLAGS="$LDFLAGS -static-libstdc++ -static-libgcc"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether g++ accepts -static-libstdc++ -static-libgcc" >&5
-$as_echo_n "checking whether g++ accepts -static-libstdc++ -static-libgcc... " >&6; }
- ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
-#error -static-libstdc++ not implemented
-#endif
-int main() {}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }; have_static_libs=yes
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
- LDFLAGS="$saved_LDFLAGS"
-fi
-
-
if test -n "$ac_tool_prefix"; then
diff -rup binutils.orig/configure.ac binutils-2.30/configure.ac
--- binutils.orig/configure.ac 2018-09-24 17:50:07.241170767 +0100
+++ binutils-2.30/configure.ac 2018-09-24 17:50:29.908992486 +0100
@@ -1288,26 +1288,6 @@ if test -z "$LD"; then
fi
fi
-# Check whether -static-libstdc++ -static-libgcc is supported.
-have_static_libs=no
-if test "$GCC" = yes; then
- saved_LDFLAGS="$LDFLAGS"
-
- LDFLAGS="$LDFLAGS -static-libstdc++ -static-libgcc"
- AC_MSG_CHECKING([whether g++ accepts -static-libstdc++ -static-libgcc])
- AC_LANG_PUSH(C++)
- AC_LINK_IFELSE([AC_LANG_SOURCE([
-#if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
-#error -static-libstdc++ not implemented
-#endif
-int main() {}])],
- [AC_MSG_RESULT([yes]); have_static_libs=yes],
- [AC_MSG_RESULT([no])])
- AC_LANG_POP(C++)
-
- LDFLAGS="$saved_LDFLAGS"
-fi
-
ACX_PROG_GNAT
ACX_PROG_CMP_IGNORE_INITIAL

View File

@ -0,0 +1,33 @@
diff -rup binutils.orig/bfd/Makefile.am binutils-2.32/bfd/Makefile.am
--- binutils.orig/bfd/Makefile.am 2019-02-08 12:22:51.395684251 +0000
+++ binutils-2.32/bfd/Makefile.am 2019-02-08 12:22:53.970664973 +0000
@@ -33,7 +33,7 @@ bfdlibdir = @bfdlibdir@
bfdincludedir = @bfdincludedir@
bfdlib_LTLIBRARIES = libbfd.la
bfdinclude_HEADERS = $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
- bfd_stdint.h $(INCDIR)/diagnostics.h $(INCDIR)/bfdlink.h
+ bfd_stdint.h $(INCDIR)/diagnostics.h $(INCDIR)/bfdlink.h $(INCDIR)/demangle.h
else !INSTALL_LIBBFD
# Empty these so that the respective installation directories will not be created.
bfdlibdir =
diff -rup binutils.orig/bfd/Makefile.in binutils-2.32/bfd/Makefile.in
--- binutils.orig/bfd/Makefile.in 2019-02-08 12:21:35.291254044 +0000
+++ binutils-2.32/bfd/Makefile.in 2019-02-08 12:22:10.163992947 +0000
@@ -249,7 +249,7 @@ am__can_run_installinfo = \
esac
am__bfdinclude_HEADERS_DIST = $(INCDIR)/plugin-api.h bfd.h \
$(INCDIR)/ansidecl.h $(INCDIR)/symcat.h bfd_stdint.h \
- $(INCDIR)/diagnostics.h $(INCDIR)/bfdlink.h
+ $(INCDIR)/diagnostics.h $(INCDIR)/bfdlink.h $(INCDIR)/demangle.h
HEADERS = $(bfdinclude_HEADERS)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
@@ -468,7 +468,7 @@ libbfd_la_LDFLAGS = $(am__append_1) -rel
@INSTALL_LIBBFD_FALSE@bfdinclude_HEADERS = $(am__append_2)
@INSTALL_LIBBFD_TRUE@bfdinclude_HEADERS = $(BFD_H) \
@INSTALL_LIBBFD_TRUE@ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
-@INSTALL_LIBBFD_TRUE@ bfd_stdint.h $(INCDIR)/diagnostics.h \
+@INSTALL_LIBBFD_TRUE@ bfd_stdint.h $(INCDIR)/diagnostics.h $(INCDIR)/demangle.h \
@INSTALL_LIBBFD_TRUE@ $(INCDIR)/bfdlink.h $(am__append_2)
@INSTALL_LIBBFD_FALSE@rpath_bfdlibdir = @bfdlibdir@
@INSTALL_LIBBFD_FALSE@noinst_LTLIBRARIES = libbfd.la

View File

@ -0,0 +1,417 @@
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-10.d binutils-2.32/ld/testsuite/ld-plugin/plugin-10.d
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-10.d 2019-02-15 13:33:21.979627285 +0000
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-10.d 2019-02-15 13:40:26.911199033 +0000
@@ -34,5 +34,6 @@ hook called: claim_file tmpdir/libtext.a
hook called: all symbols read.
Sym: '_?func' Resolution: LDPR_PREVAILING_DEF
Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
+#...
hook called: cleanup.
#...
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-12.d binutils-2.32/ld/testsuite/ld-plugin/plugin-12.d
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-12.d 2019-02-15 13:33:21.976627309 +0000
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-12.d 2019-02-15 13:47:04.060076132 +0000
@@ -1,5 +1,5 @@
#...
-.*: symbol `func' definition: 0, visibility: 0, resolution: 2
+.*: symbol `func' definition: 0, visibility: 0, resolution: .
.*: symbol `func1' definition: 0, visibility: 1, resolution: 3
.*: symbol `func2' definition: 0, visibility: 2, resolution: 3
.*: symbol `func3' definition: 0, visibility: 3, resolution: 3
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-13.d binutils-2.32/ld/testsuite/ld-plugin/plugin-13.d
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-13.d 2019-02-15 13:33:21.980627277 +0000
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-13.d 2019-02-15 13:41:30.189692800 +0000
@@ -23,5 +23,3 @@ hook called: claim_file tmpdir/main.o \[
hook called: claim_file .*/ld/testsuite/ld-plugin/func.c \[@0/.* CLAIMED
hook called: claim_file tmpdir/text.o \[@0/.* not claimed
#...
-.*main.c.*: undefined reference to `\.?func'
-#...
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-14.d binutils-2.32/ld/testsuite/ld-plugin/plugin-14.d
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-14.d 2019-02-15 13:33:21.977627301 +0000
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-14.d 2019-02-15 13:42:03.598430960 +0000
@@ -27,7 +27,6 @@ hook called: claim_file .*/ld/testsuite/
hook called: claim_file tmpdir/text.o \[@0/.* not claimed
#...
hook called: all symbols read.
-.*: tmpdir/main.o: in function `main':
-.*main.c.*: undefined reference to `\.?func'
+#...
hook called: cleanup.
#...
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-15.d binutils-2.32/ld/testsuite/ld-plugin/plugin-15.d
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-15.d 2019-02-15 13:33:21.980627277 +0000
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-15.d 2019-02-15 13:42:28.014239600 +0000
@@ -28,7 +28,6 @@ hook called: claim_file .*/ld/testsuite/
hook called: claim_file tmpdir/text.o \[@0/.* not claimed
#...
hook called: all symbols read.
-.*: tmpdir/main.o: in function `main':
-.*main.c.*: undefined reference to `\.?func'
+#...
hook called: cleanup.
#...
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-16.d binutils-2.32/ld/testsuite/ld-plugin/plugin-16.d
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-16.d 2019-02-15 13:33:21.977627301 +0000
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-16.d 2019-02-15 13:43:21.309821910 +0000
@@ -30,9 +30,8 @@ hook called: claim_file .*/ld/testsuite/
hook called: claim_file tmpdir/text.o \[@0/.* not claimed
#...
hook called: all symbols read.
-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF
+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY
Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
-.*: tmpdir/main.o: in function `main':
-.*main.c.*: undefined reference to `\.?func'
+#...
hook called: cleanup.
#...
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-17.d binutils-2.32/ld/testsuite/ld-plugin/plugin-17.d
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-17.d 2019-02-15 13:33:21.977627301 +0000
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-17.d 2019-02-15 13:43:54.925558451 +0000
@@ -31,7 +31,8 @@ hook called: claim_file .*/ld/testsuite/
hook called: claim_file tmpdir/text.o \[@0/.* not claimed
#...
hook called: all symbols read.
-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF
+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY
Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
+#...
hook called: cleanup.
#...
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-20.d binutils-2.32/ld/testsuite/ld-plugin/plugin-20.d
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-20.d 2019-02-15 13:33:21.980627277 +0000
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-20.d 2019-02-15 13:49:20.091010016 +0000
@@ -2,6 +2,5 @@ hook called: all symbols read.
Input: func.c \(tmpdir/libfunc.a\)
Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
-.*: tmpdir/main.o: in function `main':
-.*main.c.*: undefined reference to `\.?func'
+#...
hook called: cleanup.
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-21.d binutils-2.32/ld/testsuite/ld-plugin/plugin-21.d
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-21.d 2019-02-15 13:33:21.978627293 +0000
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-21.d 2019-02-15 13:49:34.506897033 +0000
@@ -2,6 +2,5 @@ hook called: all symbols read.
Input: .*/ld/testsuite/ld-plugin/func.c \(.*/ld/testsuite/ld-plugin/func.c\)
Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
-.*: tmpdir/main.o: in function `main':
-.*main.c.*: undefined reference to `\.?func'
+#...
hook called: cleanup.
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-22.d binutils-2.32/ld/testsuite/ld-plugin/plugin-22.d
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-22.d 2019-02-15 13:33:21.980627277 +0000
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-22.d 2019-02-15 13:50:00.409694022 +0000
@@ -2,6 +2,5 @@ Claimed: tmpdir/libfunc.a \[@.*
hook called: all symbols read.
Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
-.*: tmpdir/main.o: in function `main':
-.*main.c.*: undefined reference to `\.?func'
+#...
hook called: cleanup.
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-23.d binutils-2.32/ld/testsuite/ld-plugin/plugin-23.d
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-23.d 2019-02-15 13:33:21.979627285 +0000
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-23.d 2019-02-15 13:50:14.938580156 +0000
@@ -2,6 +2,5 @@ Claimed: .*/ld/testsuite/ld-plugin/func.
hook called: all symbols read.
Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
-.*: tmpdir/main.o: in function `main':
-.*main.c.*: undefined reference to `\.?func'
+#...
hook called: cleanup.
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-24.d binutils-2.32/ld/testsuite/ld-plugin/plugin-24.d
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-24.d 2019-02-15 13:33:21.980627277 +0000
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-24.d 2019-02-15 13:49:46.346804240 +0000
@@ -2,4 +2,5 @@ hook called: all symbols read.
Input: .*/ld/testsuite/ld-plugin/func.c \(.*/ld/testsuite/ld-plugin/func.c\)
Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
+#...
hook called: cleanup.
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-25.d binutils-2.32/ld/testsuite/ld-plugin/plugin-25.d
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-25.d 2019-02-15 13:33:21.978627293 +0000
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-25.d 2019-02-15 13:50:29.322467422 +0000
@@ -2,4 +2,5 @@ Claimed: .*/ld/testsuite/ld-plugin/func.
hook called: all symbols read.
Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
+#...
hook called: cleanup.
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-28.d binutils-2.32/ld/testsuite/ld-plugin/plugin-28.d
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-28.d 2019-02-15 13:33:21.977627301 +0000
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-28.d 2019-02-15 13:45:05.343006557 +0000
@@ -1 +1,3 @@
.*: error: Error
+#...
+
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-29.d binutils-2.32/ld/testsuite/ld-plugin/plugin-29.d
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-29.d 2019-02-15 13:33:21.978627293 +0000
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-29.d 2019-02-15 13:45:22.764870016 +0000
@@ -1 +1,2 @@
.*: warning: Warning
+#...
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-30.d binutils-2.32/ld/testsuite/ld-plugin/plugin-30.d
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-30.d 2019-02-15 13:33:21.976627309 +0000
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-30.d 2019-02-15 13:48:57.067190464 +0000
@@ -24,3 +24,4 @@ hook called: claim_file tmpdir/main.o \[
hook called: claim_file tmpdir/func.o \[@0/.* not claimed
hook called: claim_file tmpdir/text.o \[@0/.* not claimed
hook called: claim_file tmpdir/libempty.a \[@.* not claimed
+#pass
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-6.d binutils-2.32/ld/testsuite/ld-plugin/plugin-6.d
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-6.d 2019-02-15 13:33:21.979627285 +0000
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-6.d 2019-02-15 13:37:14.672749977 +0000
@@ -27,7 +27,6 @@ hook called: claim_file tmpdir/func.o \[
hook called: claim_file tmpdir/text.o \[@0/.* not claimed
#...
hook called: all symbols read.
-.*: tmpdir/main.o: in function `main':
-.*main.c.*: undefined reference to `\.?func'
+#...
hook called: cleanup.
#...
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-7.d binutils-2.32/ld/testsuite/ld-plugin/plugin-7.d
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-7.d 2019-02-15 13:33:21.977627301 +0000
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-7.d 2019-02-15 13:37:58.000400421 +0000
@@ -28,7 +28,6 @@ hook called: claim_file tmpdir/func.o \[
hook called: claim_file tmpdir/text.o \[@0/.* not claimed
#...
hook called: all symbols read.
-.*: tmpdir/main.o: in function `main':
-.*main.c.*: undefined reference to `\.?func'
+#...
hook called: cleanup.
#...
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-8.d binutils-2.32/ld/testsuite/ld-plugin/plugin-8.d
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-8.d 2019-02-15 13:33:21.980627277 +0000
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-8.d 2019-02-15 13:38:34.096109209 +0000
@@ -32,7 +32,6 @@ hook called: claim_file tmpdir/text.o \[
hook called: all symbols read.
Sym: '_?func' Resolution: LDPR_PREVAILING_DEF
Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
-.*: tmpdir/main.o: in function `main':
-.*main.c.*: undefined reference to `\.?func'
+#...
hook called: cleanup.
#...
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-9.d binutils-2.32/ld/testsuite/ld-plugin/plugin-9.d
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-9.d 2019-02-15 13:33:21.977627301 +0000
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-9.d 2019-02-15 13:39:52.655475403 +0000
@@ -31,7 +31,8 @@ hook called: claim_file tmpdir/func.o \[
hook called: claim_file tmpdir/text.o \[@0/.* not claimed
#...
hook called: all symbols read.
-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF
+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY
Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
+#...
hook called: cleanup.
#...
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/pr20070.d binutils-2.32/ld/testsuite/ld-plugin/pr20070.d
--- binutils-2.32.orig/ld/testsuite/ld-plugin/pr20070.d 2019-02-15 13:33:21.976627309 +0000
+++ binutils-2.32/ld/testsuite/ld-plugin/pr20070.d 2019-02-15 13:50:56.874251486 +0000
@@ -5,5 +5,6 @@ Sym: 'weakdef' Resolution: LDPR_PREVAILI
Sym: 'undef' Resolution: LDPR_UNDEF
Sym: 'weakundef' Resolution: LDPR_UNDEF
Sym: 'common' Resolution: LDPR_PREVAILING_DEF_IRONLY
+#...
hook called: cleanup.
#...
diff -rup binutils-2.32.orig/ld/testsuite/ld-srec/srec.exp binutils-2.32/ld/testsuite/ld-srec/srec.exp
--- binutils-2.32.orig/ld/testsuite/ld-srec/srec.exp 2019-02-15 13:33:21.938627615 +0000
+++ binutils-2.32/ld/testsuite/ld-srec/srec.exp 2019-02-15 13:53:58.744814006 +0000
@@ -21,6 +21,8 @@
# Get the offset from an S-record line to the start of the data.
+return
+
proc srec_off { l } {
if [string match "S1*" $l] {
return 8
diff -rup binutils-2.32.orig/ld/testsuite/ld-x86-64/x86-64.exp binutils-2.32/ld/testsuite/ld-x86-64/x86-64.exp
--- binutils-2.32.orig/ld/testsuite/ld-x86-64/x86-64.exp 2019-02-15 13:33:22.030626874 +0000
+++ binutils-2.32/ld/testsuite/ld-x86-64/x86-64.exp 2019-02-15 13:57:34.295106041 +0000
@@ -1275,25 +1275,6 @@ if { [isnative] && [which $CC] != 0 } {
"$NOPIE_CFLAGS" \
] \
]
- } else {
- run_cc_link_tests [list \
- [list \
- "Build pr22001-1b" \
- "$NOPIE_LDFLAGS -Wl,-z,nocopyreloc,--no-as-needed tmpdir/pr22001-1.so" \
- "$NOPIE_CFLAGS -Wa,-mx86-used-note=yes" \
- { pr22001-1c.c } \
- {{error_output "pr22001-1b.err"}} \
- "pr22001-1b" \
- ] \
- [list \
- "Build pr21997-1b" \
- "$NOPIE_LDFLAGS -Wl,--no-as-needed tmpdir/pr21997-1.so" \
- "$NOPIE_CFLAGS -Wa,-mx86-used-note=yes" \
- { pr21997-1c.c } \
- {{error_output "pr21997-1b.err"}} \
- "pr21997-1b" \
- ] \
- ]
}
run_ld_link_exec_tests [list \
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-10.d binutils-2.32/ld/testsuite/ld-plugin/plugin-10.d
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-10.d 2019-02-15 14:10:59.038709514 +0000
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-10.d 2019-02-15 14:13:53.532300721 +0000
@@ -32,7 +32,7 @@ hook called: claim_file tmpdir/func.o \[
hook called: claim_file tmpdir/libtext.a \[@.* not claimed
#...
hook called: all symbols read.
-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF
+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY
Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
#...
hook called: cleanup.
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-11.d binutils-2.32/ld/testsuite/ld-plugin/plugin-11.d
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-11.d 2019-02-15 14:10:59.041709490 +0000
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-11.d 2019-02-15 14:14:50.061844322 +0000
@@ -35,8 +35,9 @@ hook called: claim_file tmpdir/func.o \[
hook called: claim_file tmpdir/libtext.a \[@.* CLAIMED
#...
hook called: all symbols read.
-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF
+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY
Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
-Sym: '_?text' Resolution: LDPR_PREVAILING_DEF
+Sym: '_?text' Resolution: LDPR_PREVAILING_DEF_IRONLY
+#...
hook called: cleanup.
#...
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-12.d binutils-2.32/ld/testsuite/ld-plugin/plugin-12.d
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-12.d 2019-02-15 14:10:58.912710532 +0000
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-12.d 2019-02-15 14:13:18.464583848 +0000
@@ -1,6 +1,6 @@
#...
-.*: symbol `func' definition: 0, visibility: 0, resolution: .
-.*: symbol `func1' definition: 0, visibility: 1, resolution: 3
-.*: symbol `func2' definition: 0, visibility: 2, resolution: 3
-.*: symbol `func3' definition: 0, visibility: 3, resolution: 3
+.*: symbol `_?func' definition: 0, visibility: 0, resolution: .
+.*: symbol `_?func1' definition: 0, visibility: 1, resolution: 3
+.*: symbol `_?func2' definition: 0, visibility: 2, resolution: 3
+.*: symbol `_?func3' definition: 0, visibility: 3, resolution: 3
#pass
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-18.d binutils-2.32/ld/testsuite/ld-plugin/plugin-18.d
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-18.d 2019-02-15 14:10:58.942710289 +0000
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-18.d 2019-02-15 14:15:20.030602369 +0000
@@ -32,7 +32,8 @@ hook called: claim_file .*/ld/testsuite/
hook called: claim_file tmpdir/libtext.a \[@.* not claimed
#...
hook called: all symbols read.
-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF
+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY
Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
+#...
hook called: cleanup.
#...
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-19.d binutils-2.32/ld/testsuite/ld-plugin/plugin-19.d
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-19.d 2019-02-15 14:10:59.024709627 +0000
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-19.d 2019-02-15 14:15:54.926320633 +0000
@@ -35,8 +35,9 @@ hook called: claim_file .*/ld/testsuite/
hook called: claim_file tmpdir/libtext.a \[@.* CLAIMED
#...
hook called: all symbols read.
-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF
+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY
Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
-Sym: '_?text' Resolution: LDPR_PREVAILING_DEF
+Sym: '_?text' Resolution: LDPR_PREVAILING_DEF_IRONLY
+#...
hook called: cleanup.
#...
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-28.d binutils-2.32/ld/testsuite/ld-plugin/plugin-28.d
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-28.d 2019-02-15 14:10:58.998709837 +0000
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-28.d 2019-02-15 14:12:19.856057024 +0000
@@ -1,3 +1,2 @@
.*: error: Error
#...
-
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-8.d binutils-2.32/ld/testsuite/ld-plugin/plugin-8.d
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-8.d 2019-02-15 14:10:59.074709224 +0000
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-8.d 2019-02-15 14:11:48.144313048 +0000
@@ -30,7 +30,7 @@ hook called: claim_file tmpdir/func.o \[
hook called: claim_file tmpdir/text.o \[@0/.* not claimed
#...
hook called: all symbols read.
-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF
+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY
Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
#...
hook called: cleanup.
diff -rup binutils.orig/ld/testsuite/ld-elfvers/vers24.rd binutils-2.30/ld/testsuite/ld-elfvers/vers24.rd
--- binutils.orig/ld/testsuite/ld-elfvers/vers24.rd 2018-09-05 09:45:44.013108697 +0100
+++ binutils-2.30/ld/testsuite/ld-elfvers/vers24.rd 2018-09-05 12:06:17.287425232 +0100
@@ -7,9 +7,9 @@ Symbol table '.dynsym' contains [0-9]+ e
# And ensure the dynamic symbol table contains at least x@VERS.0
# and foo@@VERS.0 symbols
#...
- +[0-9]+: [0-9a-f]+ +(4 +OBJECT +GLOBAL +DEFAULT +[0-9]+ _?x|[0-9]+ +FUNC +GLOBAL +DEFAULT .* [0-9]+ _?foo@)@VERS\.0
+ +[0-9]+: [0-9a-f]+ +(4 +OBJECT +GLOBAL +DEFAULT +[0-9]+ _?x|[0-9]+ +FUNC +GLOBAL +DEFAULT .* [0-9]+ _?foo@)@VERS\.0.*
#...
- +[0-9]+: [0-9a-f]+ +(4 +OBJECT +GLOBAL +DEFAULT +[0-9]+ _?x|[0-9]+ +FUNC +GLOBAL +DEFAULT .* [0-9]+ _?foo@)@VERS\.0
+ +[0-9]+: [0-9a-f]+ +(4 +OBJECT +GLOBAL +DEFAULT +[0-9]+ _?x|[0-9]+ +FUNC +GLOBAL +DEFAULT .* [0-9]+ _?foo@)@VERS\.0.*
#...
Symbol table '.symtab' contains [0-9]+ entries:
#pass
diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin.exp binutils-2.30/ld/testsuite/ld-plugin/plugin.exp
--- binutils.orig/ld/testsuite/ld-plugin/plugin.exp 2018-09-05 09:45:44.023108605 +0100
+++ binutils-2.30/ld/testsuite/ld-plugin/plugin.exp 2018-09-05 11:18:53.997202105 +0100
@@ -118,6 +118,12 @@ if { $can_compile && !$failed_compile }
}
}
+# I do not know why, but the underscore prefix test is going
+# wrong on ppc64le targets. So override it here.
+if { [istarget powerpc*-*-linux*] || [istarget x86_64*-*-linux*] } {
+ set _ ""
+}
+
set testobjfiles "tmpdir/main.o tmpdir/func.o tmpdir/text.o"
set testobjfiles_notext "tmpdir/main.o tmpdir/func.o"
set testsrcfiles "tmpdir/main.o $srcdir/$subdir/func.c tmpdir/text.o"
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-12.d 2019-06-05 11:43:43.792519904 +0100
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-12.d 2019-06-05 14:14:00.520049930 +0100
@@ -1,6 +1,6 @@
#...
-.*: symbol `_?func' definition: 0, visibility: 0, resolution: .
-.*: symbol `_?func1' definition: 0, visibility: 1, resolution: 3
-.*: symbol `_?func2' definition: 0, visibility: 2, resolution: 3
-.*: symbol `_?func3' definition: 0, visibility: 3, resolution: 3
+.*: symbol `.*unc' definition: 0, visibility: 0, resolution: .
+.*: symbol `.*unc1' definition: 0, visibility: 1, resolution: 3
+.*: symbol `.*unc2' definition: 0, visibility: 2, resolution: 3
+.*: symbol `.*unc3' definition: 0, visibility: 3, resolution: 3
#pass
--- binutils.orig/ld/testsuite/ld-plugin/lto.exp 2019-12-02 10:22:47.019526080 +0000
+++ binutils-2.30/ld/testsuite/ld-plugin/lto.exp 2019-12-02 10:28:11.413354928 +0000
@@ -33,8 +33,8 @@ global CFLAGS
global CXXFLAGS
set saved_CFLAGS "$CFLAGS"
set saved_CXXFLAGS "$CXXFLAGS"
-regsub -all "(\\-Wp,)?-D_FORTIFY_SOURCE=\[0-9\]+" $CFLAGS "" CFLAGS
-regsub -all "(\\-Wp,)?-D_FORTIFY_SOURCE=\[0-9\]+" $CXXFLAGS "" CXXFLAGS
+# regsub -all "(\\-Wp,)?-D_FORTIFY_SOURCE=\[0-9\]+" $CFLAGS "" CFLAGS
+# regsub -all "(\\-Wp,)?-D_FORTIFY_SOURCE=\[0-9\]+" $CXXFLAGS "" CXXFLAGS
proc restore_notify { } {
global saved_CFLAGS
--- binutils.orig/ld/testsuite/ld-elf/pr22269-1.c 2018-05-31 16:14:12.648539694 +0100
+++ binutils-2.30/ld/testsuite/ld-elf/pr22269-1.c 2018-06-01 10:55:24.284977908 +0100
@@ -5,4 +5,5 @@ _start (void)
{
if (&foo)
return foo;
+ return 0;
}

View File

@ -0,0 +1,55 @@
--- binutils.orig/gas/write.c 2019-07-01 16:23:28.133707500 +0100
+++ binutils-2.32/gas/write.c 2019-07-01 16:24:50.699130611 +0100
@@ -1891,7 +1891,8 @@ create_obj_attrs_section (void)
static void
create_note_reloc (segT sec,
symbolS * sym,
- bfd_size_type offset,
+ bfd_size_type note_offset,
+ bfd_size_type desc2_offset,
int reloc_type,
bfd_vma addend,
char * note)
@@ -1901,10 +1902,10 @@ create_note_reloc (segT sec,
reloc = XNEW (struct reloc_list);
/* We create a .b type reloc as resolve_reloc_expr_symbols() has already been called. */
- reloc->u.b.sec = sec;
- reloc->u.b.s = symbol_get_bfdsym (sym);
+ reloc->u.b.sec = sec;
+ reloc->u.b.s = symbol_get_bfdsym (sym);
reloc->u.b.r.sym_ptr_ptr = & reloc->u.b.s;
- reloc->u.b.r.address = offset;
+ reloc->u.b.r.address = note_offset + desc2_offset;
reloc->u.b.r.addend = addend;
reloc->u.b.r.howto = bfd_reloc_type_lookup (stdoutput, reloc_type);
@@ -1929,12 +1930,12 @@ create_note_reloc (segT sec,
if (target_big_endian)
{
if (bfd_arch_bits_per_address (stdoutput) <= 32)
- note[offset + 3] = addend;
+ note[desc2_offset + 3] = addend;
else
- note[offset + 7] = addend;
+ note[desc2_offset + 7] = addend;
}
else
- note[offset] = addend;
+ note[desc2_offset] = addend;
}
}
@@ -2037,10 +2038,10 @@ maybe_generate_build_notes (void)
memcpy (note + 12, "GA$3a1", 8);
/* Create a relocation to install the start address of the note... */
- create_note_reloc (sec, sym, total_size + 20, desc_reloc, 0, note);
+ create_note_reloc (sec, sym, total_size, 20, desc_reloc, 0, note);
/* ...and another one to install the end address. */
- create_note_reloc (sec, sym, total_size + desc2_offset, desc_reloc,
+ create_note_reloc (sec, sym, total_size, desc2_offset, desc_reloc,
bfd_get_section_size (bsym->section),
note);

View File

@ -0,0 +1,99 @@
diff -rup binutils.orig/gold/layout.cc binutils-2.30/gold/layout.cc
--- binutils.orig/gold/layout.cc 2018-10-09 15:24:05.987282736 +0100
+++ binutils-2.30/gold/layout.cc 2018-10-09 16:08:29.445946736 +0100
@@ -2052,12 +2052,15 @@ Layout::attach_allocated_section_to_segm
// segment.
if (os->type() == elfcpp::SHT_NOTE)
{
+ uint64_t os_align = os->addralign();
+
// See if we already have an equivalent PT_NOTE segment.
for (p = this->segment_list_.begin();
p != segment_list_.end();
++p)
{
if ((*p)->type() == elfcpp::PT_NOTE
+ && (*p)->align() == os_align
&& (((*p)->flags() & elfcpp::PF_W)
== (seg_flags & elfcpp::PF_W)))
{
@@ -2071,6 +2074,7 @@ Layout::attach_allocated_section_to_segm
Output_segment* oseg = this->make_output_segment(elfcpp::PT_NOTE,
seg_flags);
oseg->add_output_section_to_nonload(os, seg_flags);
+ oseg->set_align(os_align);
}
}
@@ -3171,6 +3175,10 @@ Layout::create_note(const char* name, in
#else
const int size = 32;
#endif
+ // The NT_GNU_PROPERTY_TYPE_0 note conforms to gABI.
+ const int addralign = ((note_type == elfcpp::NT_GNU_PROPERTY_TYPE_0
+ ? parameters->target().get_size()
+ : size) / 8);
// The contents of the .note section.
size_t namesz = strlen(name) + 1;
@@ -3234,7 +3242,7 @@ Layout::create_note(const char* name, in
return NULL;
Output_section_data* posd = new Output_data_const_buffer(buffer, notehdrsz,
- size / 8,
+ addralign,
"** note header");
os->add_output_section_data(posd);
@@ -3692,6 +3700,11 @@ Layout::segment_precedes(const Output_se
{
if (type1 != type2)
return type1 < type2;
+ uint64_t align1 = seg1->align();
+ uint64_t align2 = seg2->align();
+ // Place segments with larger alignments first.
+ if (align1 != align2)
+ return align1 > align2;
gold_assert(flags1 != flags2
|| this->script_options_->saw_phdrs_clause());
return flags1 < flags2;
diff -rup binutils.orig/gold/output.cc binutils-2.30/gold/output.cc
--- binutils.orig/gold/output.cc 2018-10-09 15:24:05.986282744 +0100
+++ binutils-2.30/gold/output.cc 2018-10-09 16:09:03.749670846 +0100
@@ -4107,6 +4107,7 @@ Output_segment::Output_segment(elfcpp::E
: vaddr_(0),
paddr_(0),
memsz_(0),
+ align_(0),
max_align_(0),
min_p_align_(0),
offset_(0),
diff -rup binutils.orig/gold/output.h binutils-2.30/gold/output.h
--- binutils.orig/gold/output.h 2018-10-09 15:24:05.984282760 +0100
+++ binutils-2.30/gold/output.h 2018-10-09 16:09:45.665333727 +0100
@@ -4676,6 +4676,16 @@ class Output_segment
offset() const
{ return this->offset_; }
+ // Return the segment alignment.
+ uint64_t
+ align() const
+ { return this->align_; }
+
+ // Set the segment alignment.
+ void
+ set_align(uint64_t align)
+ { this->align_ = align; }
+
// Whether this is a segment created to hold large data sections.
bool
is_large_data_segment() const
@@ -4898,6 +4908,8 @@ class Output_segment
uint64_t paddr_;
// The size of the segment in memory.
uint64_t memsz_;
+ // The segment alignment.
+ uint64_t align_;
// The maximum section alignment. The is_max_align_known_ field
// indicates whether this has been finalized.
uint64_t max_align_;

View File

@ -0,0 +1,10 @@
--- binutils.orig/gold/target-reloc.h 2018-07-12 11:37:24.894494658 +0100
+++ binutils-2.30.90/gold/target-reloc.h 2018-07-12 15:38:50.049083904 +0100
@@ -136,6 +136,7 @@ class Default_comdat_behavior
if (Layout::is_debug_info_section(name))
return CB_PRETEND;
if (strcmp(name, ".eh_frame") == 0
+ || strncmp(name, ".gnu.build.attributes", 21) == 0 // FIXME: We should really be checking the section type for ST_NOTE...
|| strcmp(name, ".gcc_except_table") == 0)
return CB_IGNORE;
return CB_ERROR;

View File

@ -0,0 +1,36 @@
diff -rup binutils.orig/gold/layout.cc binutils-2.32/gold/layout.cc
--- binutils.orig/gold/layout.cc 2019-06-24 14:37:36.013086899 +0100
+++ binutils-2.32/gold/layout.cc 2019-06-24 14:41:40.054517479 +0100
@@ -868,6 +868,7 @@ Layout::get_output_section(const char* n
&& (same_name->flags() & elfcpp::SHF_TLS) == 0)
os = same_name;
}
+#if 0 /* BZ 1722715, PR 17556. */
else if ((flags & elfcpp::SHF_TLS) == 0)
{
elfcpp::Elf_Xword zero_flags = 0;
@@ -878,6 +879,7 @@ Layout::get_output_section(const char* n
if (p != this->section_name_map_.end())
os = p->second;
}
+#endif
}
if (os == NULL)
diff -rup binutils.orig/gold/object.cc binutils-2.32/gold/object.cc
--- binutils.orig/gold/object.cc 2019-06-24 14:37:36.012086906 +0100
+++ binutils-2.32/gold/object.cc 2019-06-24 14:39:59.287165501 +0100
@@ -1644,6 +1644,13 @@ Sized_relobj_file<size, big_endian>::do_
omit[i] = true;
}
+ // Skip empty sections without flags.
+ if (!(shdr.get_sh_flags() & ~elfcpp::SHF_GROUP)
+ && !shdr.get_sh_size())
+ {
+ omit[i] = true;
+ }
+
bool discard = omit[i];
if (!discard)
{

View File

@ -0,0 +1,24 @@
--- binutils-2.32.orig/bfd/elf-eh-frame.c 2019-06-26 07:05:43.839194746 -0400
+++ binutils-2.32/bfd/elf-eh-frame.c 2019-06-26 07:32:37.124219479 -0400
@@ -2478,11 +2478,16 @@ write_dwarf_eh_frame_hdr (bfd *abfd, str
!= sec->output_section->vma + val))
overflow = TRUE;
bfd_put_32 (abfd, val, contents + EH_FRAME_HDR_SIZE + i * 8 + 8);
- if (i != 0
- && (hdr_info->u.dwarf.array[i].initial_loc
- < (hdr_info->u.dwarf.array[i - 1].initial_loc
- + hdr_info->u.dwarf.array[i - 1].range)))
- overlap = TRUE;
+ if (i != 0)
+ {
+ struct eh_frame_array_ent * this_entry = hdr_info->u.dwarf.array + i;
+ struct eh_frame_array_ent * prev_entry = hdr_info->u.dwarf.array + (i - 1);
+
+ if (this_entry->initial_loc < prev_entry->initial_loc + prev_entry->range
+ && (this_entry->initial_loc != prev_entry->initial_loc
+ || this_entry->range != prev_entry->range))
+ overlap = TRUE;
+ }
}
if (overflow)
_bfd_error_handler (_(".eh_frame_hdr entry overflow"));

View File

@ -0,0 +1,413 @@
--- binutils-2.32.orig/ld/testsuite/ld-x86-64/x86-64.exp 2019-06-05 11:43:44.758513156 +0100
+++ binutils-2.32/ld/testsuite/ld-x86-64/x86-64.exp 2019-06-05 11:51:33.732236961 +0100
@@ -1910,7 +1910,6 @@ if { [isnative] && [which $CC] != 0 } {
}
}
- undefined_weak "$NOPIE_CFLAGS" "$NOPIE_LDFLAGS"
undefined_weak "-fPIE" ""
undefined_weak "-fPIE" "-pie"
undefined_weak "-fPIE" "-Wl,-z,nodynamic-undefined-weak"
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin.exp 2019-06-05 11:43:43.812519765 +0100
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin.exp 2019-06-05 12:09:27.292669536 +0100
@@ -283,6 +283,7 @@ if { !$can_compile || $failed_compile }
foreach testitem $plugin_tests {
$failure_kind [lindex $testitem 0]
}
+ return
if { [is_elf_format] } {
foreach testitem $plugin_extra_elf_tests {
$failure_kind [lindex $testitem 0]
@@ -293,13 +294,6 @@ if { !$can_compile || $failed_compile }
run_ld_link_tests $plugin_tests
-if { [is_elf_format] \
- && [ld_compile "$CC $CFLAGS" $srcdir/$subdir/func1p.c tmpdir/func1p.o] \
- && [ld_compile "$CC $CFLAGS" $srcdir/$subdir/func2i.c tmpdir/func2i.o] \
- && [ld_compile "$CC $CFLAGS" $srcdir/$subdir/func3h.c tmpdir/func3h.o] } {
- run_ld_link_tests $plugin_extra_elf_tests
-}
-
if {![ar_simple_create $ar "" "tmpdir/libtext.a" "tmpdir/text.o"] || \
![ar_simple_create $ar "" "tmpdir/libempty.a" ""]} {
foreach testitem $plugin_lib_tests {
--- binutils-2.32.orig/ld/testsuite/ld-elf/dwarf.exp 2019-06-05 11:43:45.367508902 +0100
+++ binutils-2.32/ld/testsuite/ld-elf/dwarf.exp 2019-06-05 17:28:30.229619676 +0100
@@ -118,4 +118,5 @@ proc strip_test {} {
pass "$test_name"
}
+return
strip_test
--- binutils.orig/ld/testsuite/ld-elfvsb/elfvsb.exp 2019-06-06 11:35:12.118434555 +0100
+++ binutils-2.32/ld/testsuite/ld-elfvsb/elfvsb.exp 2019-06-06 13:02:07.239703744 +0100
@@ -324,6 +324,8 @@ proc visibility_run {visibility} {
setup_xfail "arm*-*-linux*"
}
+ setup_xfail "i686-*-linux*"
+
visibility_test $visibility vnp "visibility ($visibility) (non PIC)" mainnp.o sh1np.o sh2np.o elfvsb
# Test ELF shared library relocations with a non-zero load
@@ -365,6 +367,8 @@ proc visibility_run {visibility} {
setup_xfail "arm*-*-linux*"
}
+ setup_xfail "i686-*-linux*"
+
visibility_test $visibility vnp "visibility ($visibility) (non PIC, load offset)" \
mainnp.o sh1np.o sh2np.o elfvsb \
"-Wl,-T,$srcdir/$subdir/elf-offset.ld,--hash-style=sysv"
@@ -436,6 +440,8 @@ proc visibility_run {visibility} {
setup_xfail "arm*-*-linux*"
}
+ setup_xfail "i686-*-linux*"
+
visibility_test $visibility vmpnp "visibility ($visibility) (PIC main, non PIC so)" mainp.o sh1np.o sh2np.o elfvsb
}
} else {
--- binutils.orig/ld/testsuite/ld-i386/plt-main.rd 2019-06-06 11:35:12.199433977 +0100
+++ binutils-2.32/ld/testsuite/ld-i386/plt-main.rd 2019-06-06 13:03:42.280038461 +0100
@@ -1,4 +1,4 @@
-#failif
+#pass
#...
[0-9a-f ]+R_386_JUMP_SLOT +0+ +bar
#...
--- binutils.orig/ld/testsuite/ld-i386/i386.exp 2019-06-06 11:35:12.195434005 +0100
+++ binutils-2.32/ld/testsuite/ld-i386/i386.exp 2019-06-06 13:11:56.324580169 +0100
@@ -1035,15 +1035,6 @@ if { [isnative]
"pr18900.out" \
] \
[list \
- "Run pr19031" \
- "$NOPIE_LDFLAGS tmpdir/pr19031.so" \
- "-Wa,-mx86-used-note=yes" \
- { pr19031b.S pr19031c.c } \
- "pr19031" \
- "pr19031.out" \
- "$NOPIE_CFLAGS" \
- ] \
- [list \
"Run got1" \
"$NOPIE_LDFLAGS tmpdir/got1d.so" \
"-Wa,-mx86-used-note=yes" \
@@ -1158,7 +1149,6 @@ if { [isnative]
] \
]
- undefined_weak "$NOPIE_CFLAGS" "$NOPIE_LDFLAGS"
undefined_weak "-fPIE" "$NOPIE_LDFLAGS"
undefined_weak "-fPIE" "-pie"
undefined_weak "-fPIE" "-z nodynamic-undefined-weak $NOPIE_LDFLAGS"
--- binutils.orig/ld/testsuite/ld-i386/plt-pie-ibt.dd 2019-06-06 11:35:12.194434012 +0100
+++ binutils-2.32/ld/testsuite/ld-i386/plt-pie-ibt.dd 2019-06-06 13:13:09.380068780 +0100
@@ -1,4 +1,4 @@
-#...
+#pass
Disassembly of section .plt.got:
[a-f0-9]+ <[_a-z]+@plt>:
--- binutils.orig/ld/testsuite/ld-scripts/crossref.exp 2019-06-06 11:35:12.072434885 +0100
+++ binutils-2.32/ld/testsuite/ld-scripts/crossref.exp 2019-06-06 13:15:45.042979139 +0100
@@ -148,6 +148,8 @@ set exec_output [prune_warnings $exec_ou
regsub -all "(^|\n)($ld: warning: cannot find entry symbol\[^\n\]*\n?)" $exec_output "\\1" exec_output
+setup_xfail "i686-*-linux*"
+
if [string match "" $exec_output] then {
pass $test3
} else {
@@ -188,6 +190,8 @@ set exec_output [prune_warnings $exec_ou
regsub -all "(^|\n)($ld: warning: cannot find entry symbol\[^\n\]*\n?)" $exec_output "\\1" exec_output
+setup_xfail "i686-*-linux*"
+
if [string match "" $exec_output] then {
pass $test6
} else {
@@ -200,6 +204,8 @@ set exec_output [prune_warnings $exec_ou
regsub -all "(^|\n)($ld: warning: cannot find entry symbol\[^\n\]*\n?)" $exec_output "\\1" exec_output
+setup_xfail "i686-*-linux*"
+
if [string match "" $exec_output] then {
fail $test7
} else {
--- binutils.orig/ld/testsuite/ld-shared/shared.exp 2019-06-06 11:35:12.143434377 +0100
+++ binutils-2.32/ld/testsuite/ld-shared/shared.exp 2019-06-06 13:18:15.969417246 +0100
@@ -242,6 +242,7 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG" $
setup_xfail "arm*-*-linux*"
}
setup_xfail "aarch64*-*-linux*"
+ setup_xfail "i686-*-linux*"
shared_test shnp "shared (non PIC)" mainnp.o sh1np.o sh2np.o shared
# Test ELF shared library relocations with a non-zero load
@@ -268,6 +269,7 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG" $
setup_xfail "arm*-*-linux*"
}
setup_xfail "aarch64*-*-linux*"
+ setup_xfail "i686-*-linux*"
shared_test shnp "shared (non PIC, load offset)" \
mainnp.o sh1np.o sh2np.o shared \
"-Wl,-T,$srcdir/$subdir/elf-offset.ld,--hash-style=sysv"
@@ -321,6 +323,7 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG $p
setup_xfail "arm*-*-linux*"
}
setup_xfail "aarch64*-*-linux*"
+ setup_xfail "i686-*-linux*"
shared_test shmpnp "shared (PIC main, non PIC so)" mainp.o sh1np.o sh2np.o shared
}
} else {
--- binutils.orig/ld/testsuite/ld-plugin/plugin-8.d 2019-06-06 11:35:12.093434734 +0100
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-8.d 2019-06-06 13:50:43.381100668 +0100
@@ -30,7 +30,7 @@ hook called: claim_file tmpdir/func.o \[
hook called: claim_file tmpdir/text.o \[@0/.* not claimed
#...
hook called: all symbols read.
-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY
+Sym: '_?func' Resolution: LDPR_PREVAILING_DE.*
Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
#...
hook called: cleanup.
--- binutils.orig/ld/testsuite/ld-plugin/plugin-9.d 2019-06-06 11:35:12.095434720 +0100
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-9.d 2019-06-06 13:52:09.264504779 +0100
@@ -31,7 +31,7 @@ hook called: claim_file tmpdir/func.o \[
hook called: claim_file tmpdir/text.o \[@0/.* not claimed
#...
hook called: all symbols read.
-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY
+Sym: '_?func' Resolution: LDPR_PREVAILING_DE.*
Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
#...
hook called: cleanup.
--- binutils.orig/ld/testsuite/ld-plugin/plugin-16.d 2019-06-06 11:35:12.094434727 +0100
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-16.d 2019-06-06 13:52:57.012173488 +0100
@@ -30,7 +30,7 @@ hook called: claim_file .*/ld/testsuite/
hook called: claim_file tmpdir/text.o \[@0/.* not claimed
#...
hook called: all symbols read.
-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY
+Sym: '_?func' Resolution: LDPR_PREVAILING_DE.*
Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
#...
hook called: cleanup.
--- binutils.orig/ld/testsuite/ld-plugin/plugin-17.d 2019-06-06 11:35:12.092434742 +0100
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-17.d 2019-06-06 13:53:27.107964671 +0100
@@ -31,7 +31,7 @@ hook called: claim_file .*/ld/testsuite/
hook called: claim_file tmpdir/text.o \[@0/.* not claimed
#...
hook called: all symbols read.
-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY
+Sym: '_?func' Resolution: LDPR_PREVAILING_DE.*
Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
#...
hook called: cleanup.
--- binutils.orig/ld/testsuite/ld-plugin/plugin-10.d 2019-06-06 11:35:12.095434720 +0100
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-10.d 2019-06-06 13:54:12.946646622 +0100
@@ -32,7 +32,7 @@ hook called: claim_file tmpdir/func.o \[
hook called: claim_file tmpdir/libtext.a \[@.* not claimed
#...
hook called: all symbols read.
-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY
+Sym: '_?func' Resolution: LDPR_PREVAILING_DE.*
Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
#...
hook called: cleanup.
--- binutils.orig/ld/testsuite/ld-plugin/plugin-11.d 2019-06-06 11:35:12.095434720 +0100
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-11.d 2019-06-06 13:54:52.018375537 +0100
@@ -35,9 +35,9 @@ hook called: claim_file tmpdir/func.o \[
hook called: claim_file tmpdir/libtext.a \[@.* CLAIMED
#...
hook called: all symbols read.
-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY
+Sym: '_?func' Resolution: LDPR_PREVAILING_DE.*
Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
-Sym: '_?text' Resolution: LDPR_PREVAILING_DEF_IRONLY
+Sym: '_?text' Resolution: LDPR_PREVAILING_DE.*
#...
hook called: cleanup.
#...
--- binutils.orig/ld/testsuite/ld-plugin/plugin-18.d 2019-06-06 11:35:12.094434727 +0100
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-18.d 2019-06-06 13:55:20.259179591 +0100
@@ -32,7 +32,7 @@ hook called: claim_file .*/ld/testsuite/
hook called: claim_file tmpdir/libtext.a \[@.* not claimed
#...
hook called: all symbols read.
-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY
+Sym: '_?func' Resolution: LDPR_PREVAILING_DE.*
Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
#...
hook called: cleanup.
--- binutils.orig/ld/testsuite/ld-plugin/plugin-19.d 2019-06-06 11:35:12.091434749 +0100
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-19.d 2019-06-06 13:56:02.082889405 +0100
@@ -35,9 +35,9 @@ hook called: claim_file .*/ld/testsuite/
hook called: claim_file tmpdir/libtext.a \[@.* CLAIMED
#...
hook called: all symbols read.
-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY
+Sym: '_?func' Resolution: LDPR_PREVAILING_DE.*
Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
-Sym: '_?text' Resolution: LDPR_PREVAILING_DEF_IRONLY
+Sym: '_?text' Resolution: LDPR_PREVAILING_DE.*
#...
hook called: cleanup.
#...
--- binutils.orig/ld/testsuite/ld-elf/indirect.exp 2019-06-06 11:35:12.178434127 +0100
+++ binutils-2.32/ld/testsuite/ld-elf/indirect.exp 2019-06-06 14:09:25.695255087 +0100
@@ -194,7 +194,9 @@ set run_tests {
{pr19553a.c} "pr19553d" "pr19553d.out"}
}
-run_ld_link_exec_tests $run_tests
+if { ![istarget s390*-*-linux*] } {
+ run_ld_link_exec_tests $run_tests
+}
# Check that "bar" is not dynamic in the executable
proc check_dynamic_syms { test } {
--- binutils.orig/ld/testsuite/ld-elf/shared.exp 2019-06-06 11:35:12.181434105 +0100
+++ binutils-2.32/ld/testsuite/ld-elf/shared.exp 2019-06-06 14:21:20.232084981 +0100
@@ -1287,18 +1287,6 @@ if { [istarget *-*-linux*]
"pr22393-2-static" \
"pass.out" \
] \
- [list \
- "Run pr21964-4" \
- "" \
- "" \
- {pr21964-4.c} \
- "pr21964-4" \
- "pass.out" \
- "" \
- "" \
- "" \
- "-ldl" \
- ] \
]
}
--- binutils.orig/ld/testsuite/ld-elf/pr22263-1.rd 2019-06-06 11:35:12.177434134 +0100
+++ binutils-2.32/ld/testsuite/ld-elf/pr22263-1.rd 2019-06-06 14:22:44.182500130 +0100
@@ -1,5 +1,5 @@
# tprel relocs are not needed in a PIE
-#failif
+#pass
#...
.* R_.*_TP.*
#pass
--- binutils.orig/ld/testsuite/ld-ifunc/pr23169c.rd 2019-06-06 11:35:12.077434849 +0100
+++ binutils-2.32/ld/testsuite/ld-ifunc/pr23169c.rd 2019-06-06 14:24:35.941721548 +0100
@@ -1,3 +1,3 @@
-#...
+#pass
+[0-9]+: +[0-9a-f]+ +[0-9]+ +IFUNC +GLOBAL +DEFAULT.* [0-9]+ +func
#pass
--- binutils.orig/ld/testsuite/ld-ifunc/pr23169b.rd 2019-06-06 11:35:12.076434856 +0100
+++ binutils-2.32/ld/testsuite/ld-ifunc/pr23169b.rd 2019-06-06 14:25:55.494165610 +0100
@@ -1,4 +1,4 @@
-#failif
+#pass
#...
[0-9a-f]+ +[0-9a-f]+ +R_[^ ]+ +[0-9a-f]+ +func(| \+ 0)
#pass
--- binutils.orig/ld/testsuite/ld-powerpc/pr23937.d 2019-06-06 14:30:41.510166625 +0100
+++ binutils-2.32/ld/testsuite/ld-powerpc/pr23937.d 2019-06-06 14:40:11.152185368 +0100
@@ -5,6 +5,6 @@
#...
.* R_PPC64_IRELATIVE +10000180
-#...
+#pass
.*: 0+10000180 +20 IFUNC +LOCAL +DEFAULT .* magic
#pass
--- binutils.orig/ld/testsuite/ld-elf/indirect.exp 2019-06-06 14:30:41.576166163 +0100
+++ binutils-2.32/ld/testsuite/ld-elf/indirect.exp 2019-06-06 16:07:44.330408051 +0100
@@ -215,6 +215,10 @@ proc check_dynamic_syms { test } {
return 1
}
+if { [istarget s390*-*-linux*] } {
+ return
+}
+
foreach t [list indirect5a indirect5b indirect6a indirect6b] {
set testname [concat $t "dynsym"]
if { [check_dynamic_syms tmpdir/$t] } {
--- binutils.orig/ld/testsuite/ld-ifunc/ifunc.exp 2019-06-06 14:30:41.487166785 +0100
+++ binutils-2.32/ld/testsuite/ld-ifunc/ifunc.exp 2019-06-06 16:11:13.545947519 +0100
@@ -300,15 +300,21 @@ if {! [check_osabi tmpdir/static_nonifun
# should not.
if {[contains_ifunc_symbol tmpdir/libshared_ifunc.so] != 1} {
+ setup_xfail "ppc64*-*-linux-gnu"
+ setup_xfail "powerpc64*-*-linux-gnu"
fail "Shared libraries containing ifunc does not contain an IFUNC symbol"
set fails [expr $fails + 1]
}
if {[contains_ifunc_symbol tmpdir/local_prog] != 1} {
+ setup_xfail "ppc64*-*-linux-gnu"
+ setup_xfail "powerpc64*-*-linux-gnu"
fail "Local ifunc-using executable does not contain an IFUNC symbol"
set fails [expr $fails + 1]
}
if { ![string match "" $STATIC_LDFLAGS] \
&& [contains_ifunc_symbol tmpdir/static_prog] != 1} {
+ setup_xfail "ppc64*-*-linux-gnu"
+ setup_xfail "powerpc64*-*-linux-gnu"
fail "Static ifunc-using executable does not contain an IFUNC symbol"
set fails [expr $fails + 1]
}
@@ -587,6 +593,13 @@ run_cc_link_tests [list \
{} \
"libpr18841cn.so" \
] \
+]
+
+if { [isnative]
+ && !([istarget "powerpc*-*-*"]
+ || [istarget "aarch64*-*-*"]
+ || [istarget "sparc*-*-*"]) } {
+run_cc_link_tests [list \
[list \
"Build libpr23169a.so" \
"-shared" \
@@ -657,7 +670,8 @@ run_cc_link_tests [list \
{readelf {-r -W} pr23169b.rd}} \
"pr23169f" \
] \
-]
+ ]
+}
run_ld_link_exec_tests [list \
[list \
@@ -719,7 +733,7 @@ run_ld_link_exec_tests [list \
# That does not happen for the pr23169 testcase where the resolver is
# in the executable (which is relocated last by ld.so).
if { [isnative]
- && !([istarget "powerpc-*-*"]
+ && !([istarget "powerpc*-*-*"]
|| [istarget "aarch64*-*-*"]
|| [istarget "sparc*-*-*"]) } {
run_ld_link_exec_tests [list \
--- binutils.orig/ld/testsuite/ld-x86-64/x86-64.exp 2019-06-12 11:00:46.555467871 +0100
+++ binutils-2.32/ld/testsuite/ld-x86-64/x86-64.exp 2019-06-12 11:06:19.179023902 +0100
@@ -1956,7 +1956,9 @@ run_ld_link_tests [list \
global LD_CLASS
if { "$LD_CLASS" == "64bit" } then {
# This test needs 64-bit linker.
- run_dump_test "pr17618"
+ # The test times out when runnig under OSCI's test harness, because
+ # it is so overloaded, so skip it for now. The test works normally.
+ # run_dump_test "pr17618"
}
run_dump_test "pltgot-1"
run_dump_test "pltgot-2"

View File

@ -0,0 +1,19 @@
--- binutils.orig/bfd/configure 2019-06-24 14:37:35.984087086 +0100
+++ binutils-2.32/bfd/configure 2019-06-24 17:32:52.515541752 +0100
@@ -18865,11 +18865,11 @@ _LT_EOF
esac
done ;;
"bfd_stdint.h":C)
-if test "$GCC" = yes; then
- echo "/* generated for " `$CC --version | sed 1q` "*/" > tmp-stdint.h
-else
- echo "/* generated for $CC */" > tmp-stdint.h
-fi
+
+
+
+
+
sed 's/^ *//' >> tmp-stdint.h <<EOF

View File

@ -0,0 +1,28 @@
--- binutils.orig/binutils/objcopy.c 2019-08-06 09:42:51.065854915 +0100
+++ binutils-2.30/binutils/objcopy.c 2019-08-06 09:47:36.293974283 +0100
@@ -2161,12 +2161,10 @@ merge_gnu_build_notes (bfd * abfd, asect
attribute_type_byte = version_1_seen ? 1 : 3;
val_start = attribute_type_byte + 1;
- /* The first note should be the first version note. */
- if (pnotes[0].note.namedata[attribute_type_byte] != GNU_BUILD_ATTRIBUTE_VERSION)
- {
- err = _("bad GNU build attribute notes: first note not version note");
- goto done;
- }
+ /* We used to require that the first note be a version note,
+ but this is no longer enforced. Due to the problems with
+ linking sections with the same name (eg .gnu.build.note.hot)
+ we cannot guarantee that the first note will be a version note. */
/* Now merge the notes. The rules are:
1. Preserve the ordering of the notes.
@@ -2184,7 +2182,7 @@ merge_gnu_build_notes (bfd * abfd, asect
description field of the note must be changed to contain the starting
address to which it refers.
6. Notes with the same start and end address can be deleted. */
- for (pnote = pnotes + 1; pnote < pnotes_end; pnote ++)
+ for (pnote = pnotes; pnote < pnotes_end; pnote ++)
{
int note_type;
objcopy_internal_note * back;

View File

@ -0,0 +1,66 @@
diff -rup binutils.orig/binutils/readelf.c binutils-2.29/binutils/readelf.c
--- binutils.orig/binutils/readelf.c 2017-12-12 16:24:19.571221194 +0000
+++ binutils-2.29/binutils/readelf.c 2017-12-12 16:27:26.997979803 +0000
@@ -11018,12 +11018,14 @@ print_dynamic_symbol (bfd_vma si, unsign
unsigned int vis = ELF_ST_VISIBILITY (psym->st_other);
printf (" %-7s", get_symbol_visibility (vis));
+#if 0
/* Check to see if any other bits in the st_other field are set.
Note - displaying this information disrupts the layout of the
table being generated, but for the moment this case is very
rare. */
if (psym->st_other ^ vis)
printf (" [%s] ", get_symbol_other (filedata, psym->st_other ^ vis));
+#endif
}
printf (" %3.3s ", get_symbol_index_type (filedata, psym->st_shndx));
@@ -11031,6 +11033,15 @@ print_dynamic_symbol (bfd_vma si, unsign
print_symbol (25, GET_DYNAMIC_NAME (psym->st_name));
else
printf (_(" <corrupt: %14ld>"), psym->st_name);
+#if 1
+ {
+ unsigned int vis = ELF_ST_VISIBILITY (psym->st_other);
+
+ /* Check to see if any other bits in the st_other field are set. */
+ if (psym->st_other ^ vis)
+ printf (" \t[%s]", get_symbol_other (filedata, psym->st_other ^ vis));
+ }
+#endif
putchar ('\n');
}
--- binutils.orig/binutils/readelf.c 2017-12-12 16:36:21.806561149 +0000
+++ binutils-2.29.1/binutils/readelf.c 2017-12-12 16:38:17.763168514 +0000
@@ -11548,11 +11548,13 @@ process_symbol_table (FILE * file)
unsigned int vis = ELF_ST_VISIBILITY (psym->st_other);
printf (" %-7s", get_symbol_visibility (vis));
+#if 0
/* Check to see if any other bits in the st_other field are set.
Note - displaying this information disrupts the layout of the
table being generated, but for the moment this case is very rare. */
if (psym->st_other ^ vis)
printf (" [%s] ", get_symbol_other (filedata, psym->st_other ^ vis));
+#endif
}
printf (" %4s ", get_symbol_index_type (filedata, psym->st_shndx));
print_symbol (25, psym->st_name < strtab_size
@@ -11571,7 +11573,15 @@ process_symbol_table (FILE * file)
printf (sym_info == symbol_hidden ? "@%s" : "@@%s",
version_string);
}
+#if 1
+ {
+ unsigned int vis = ELF_ST_VISIBILITY (psym->st_other);
+ /* Check to see if any other bits in the st_other field are set. */
+ if (psym->st_other ^ vis)
+ printf (" \t[%s] ", get_symbol_other (filedata, psym->st_other ^ vis));
+ }
+#endif
putchar ('\n');
if (ELF_ST_BIND (psym->st_info) == STB_LOCAL

View File

@ -0,0 +1,10 @@
--- binutils.orig/binutils/objcopy.c 2019-08-05 13:14:52.037496277 +0100
+++ binutils-2.32/binutils/objcopy.c 2019-08-05 13:14:58.491455624 +0100
@@ -2225,7 +2225,6 @@ merge_gnu_build_notes (bfd * abfd, asect
&& back->note.namesz == pnote->note.namesz
&& memcmp (back->note.namedata, pnote->note.namedata, pnote->note.namesz) == 0)
{
- fprintf (stderr, "DUP FUNXC\n");
duplicate_found = TRUE;
pnote->note.type = 0;
break;

View File

@ -0,0 +1,355 @@
diff -rup binutils.orig/gas/testsuite/gas/s390/zarch-arch13.d binutils-2.30/gas/testsuite/gas/s390/zarch-arch13.d
--- binutils.orig/gas/testsuite/gas/s390/zarch-arch13.d 2019-06-18 13:41:27.796052644 +0100
+++ binutils-2.30/gas/testsuite/gas/s390/zarch-arch13.d 2019-06-18 13:48:01.504295109 +0100
@@ -61,27 +61,27 @@ Disassembly of section .text:
.*: b9 e3 bd 69 [ ]*selgrnh %r6,%r9,%r11
.*: b9 e3 bd 69 [ ]*selgrnh %r6,%r9,%r11
.*: b9 e3 be 69 [ ]*selgrno %r6,%r9,%r11
-.*: b9 c0 bd 69 [ ]*selhhhrnh %r6,%r9,%r11
-.*: b9 c0 b1 69 [ ]*selhhhro %r6,%r9,%r11
-.*: b9 c0 b2 69 [ ]*selhhhrh %r6,%r9,%r11
-.*: b9 c0 b2 69 [ ]*selhhhrh %r6,%r9,%r11
-.*: b9 c0 b3 69 [ ]*selhhhrnle %r6,%r9,%r11
-.*: b9 c0 b4 69 [ ]*selhhhrl %r6,%r9,%r11
-.*: b9 c0 b4 69 [ ]*selhhhrl %r6,%r9,%r11
-.*: b9 c0 b5 69 [ ]*selhhhrnhe %r6,%r9,%r11
-.*: b9 c0 b6 69 [ ]*selhhhrlh %r6,%r9,%r11
-.*: b9 c0 b7 69 [ ]*selhhhrne %r6,%r9,%r11
-.*: b9 c0 b7 69 [ ]*selhhhrne %r6,%r9,%r11
-.*: b9 c0 b8 69 [ ]*selhhhre %r6,%r9,%r11
-.*: b9 c0 b8 69 [ ]*selhhhre %r6,%r9,%r11
-.*: b9 c0 b9 69 [ ]*selhhhrnlh %r6,%r9,%r11
-.*: b9 c0 ba 69 [ ]*selhhhrhe %r6,%r9,%r11
-.*: b9 c0 bb 69 [ ]*selhhhrnl %r6,%r9,%r11
-.*: b9 c0 bb 69 [ ]*selhhhrnl %r6,%r9,%r11
-.*: b9 c0 bc 69 [ ]*selhhhrle %r6,%r9,%r11
-.*: b9 c0 bd 69 [ ]*selhhhrnh %r6,%r9,%r11
-.*: b9 c0 bd 69 [ ]*selhhhrnh %r6,%r9,%r11
-.*: b9 c0 be 69 [ ]*selhhhrno %r6,%r9,%r11
+.*: b9 c0 bd 69 [ ]*selfhrnh %r6,%r9,%r11
+.*: b9 c0 b1 69 [ ]*selfhro %r6,%r9,%r11
+.*: b9 c0 b2 69 [ ]*selfhrh %r6,%r9,%r11
+.*: b9 c0 b2 69 [ ]*selfhrh %r6,%r9,%r11
+.*: b9 c0 b3 69 [ ]*selfhrnle %r6,%r9,%r11
+.*: b9 c0 b4 69 [ ]*selfhrl %r6,%r9,%r11
+.*: b9 c0 b4 69 [ ]*selfhrl %r6,%r9,%r11
+.*: b9 c0 b5 69 [ ]*selfhrnhe %r6,%r9,%r11
+.*: b9 c0 b6 69 [ ]*selfhrlh %r6,%r9,%r11
+.*: b9 c0 b7 69 [ ]*selfhrne %r6,%r9,%r11
+.*: b9 c0 b7 69 [ ]*selfhrne %r6,%r9,%r11
+.*: b9 c0 b8 69 [ ]*selfhre %r6,%r9,%r11
+.*: b9 c0 b8 69 [ ]*selfhre %r6,%r9,%r11
+.*: b9 c0 b9 69 [ ]*selfhrnlh %r6,%r9,%r11
+.*: b9 c0 ba 69 [ ]*selfhrhe %r6,%r9,%r11
+.*: b9 c0 bb 69 [ ]*selfhrnl %r6,%r9,%r11
+.*: b9 c0 bb 69 [ ]*selfhrnl %r6,%r9,%r11
+.*: b9 c0 bc 69 [ ]*selfhrle %r6,%r9,%r11
+.*: b9 c0 bd 69 [ ]*selfhrnh %r6,%r9,%r11
+.*: b9 c0 bd 69 [ ]*selfhrnh %r6,%r9,%r11
+.*: b9 c0 be 69 [ ]*selfhrno %r6,%r9,%r11
.*: e6 f6 9f a0 d0 06 [ ]*vlbr %v15,4000\(%r6,%r9\),13
.*: e6 f6 9f a0 10 06 [ ]*vlbrh %v15,4000\(%r6,%r9\)
.*: e6 f6 9f a0 20 06 [ ]*vlbrf %v15,4000\(%r6,%r9\)
@@ -130,11 +130,8 @@ Disassembly of section .text:
.*: e7 f1 42 00 87 8b [ ]*vstrsf %v15,%v17,%v20,%v24
.*: e7 f1 42 d0 87 8b [ ]*vstrsf %v15,%v17,%v20,%v24,13
.*: e7 f1 40 20 87 8b [ ]*vstrszb %v15,%v17,%v20,%v24
-.*: e7 f1 40 f0 87 8b [ ]*vstrszb %v15,%v17,%v20,%v24,13
.*: e7 f1 41 20 87 8b [ ]*vstrszh %v15,%v17,%v20,%v24
-.*: e7 f1 41 f0 87 8b [ ]*vstrszh %v15,%v17,%v20,%v24,13
.*: e7 f1 42 20 87 8b [ ]*vstrszf %v15,%v17,%v20,%v24
-.*: e7 f1 42 f0 87 8b [ ]*vstrszf %v15,%v17,%v20,%v24,13
.*: e7 f1 00 bc d4 c3 [ ]*vcfps %v15,%v17,13,12,11
.*: e7 f1 00 cd 24 c3 [ ]*wcefb %v15,%v17,5,12
.*: e7 f1 00 cd 24 c3 [ ]*wcefb %v15,%v17,5,12
@@ -154,3 +151,4 @@ Disassembly of section .text:
.*: e6 6f 00 d0 00 52 [ ]*vcvbg %r6,%v15,13
.*: e6 6f 00 dc 00 52 [ ]*vcvbg %r6,%v15,13,12
.*: b9 3a 00 69 [ ]*kdsa %r6,%r9
+.*: 07 07 [ ]*nopr %r7
diff -rup binutils.orig/gas/testsuite/gas/s390/zarch-arch13.s binutils-2.30/gas/testsuite/gas/s390/zarch-arch13.s
--- binutils.orig/gas/testsuite/gas/s390/zarch-arch13.s 2019-06-18 13:41:27.794052658 +0100
+++ binutils-2.30/gas/testsuite/gas/s390/zarch-arch13.s 2019-06-18 13:48:01.504295109 +0100
@@ -55,27 +55,27 @@ foo:
selgrnh %r6,%r9,%r11
selgrnp %r6,%r9,%r11
selgrno %r6,%r9,%r11
- selhhhr %r6,%r9,%r11,13
- selhhhro %r6,%r9,%r11
- selhhhrh %r6,%r9,%r11
- selhhhrp %r6,%r9,%r11
- selhhhrnle %r6,%r9,%r11
- selhhhrl %r6,%r9,%r11
- selhhhrm %r6,%r9,%r11
- selhhhrnhe %r6,%r9,%r11
- selhhhrlh %r6,%r9,%r11
- selhhhrne %r6,%r9,%r11
- selhhhrnz %r6,%r9,%r11
- selhhhre %r6,%r9,%r11
- selhhhrz %r6,%r9,%r11
- selhhhrnlh %r6,%r9,%r11
- selhhhrhe %r6,%r9,%r11
- selhhhrnl %r6,%r9,%r11
- selhhhrnm %r6,%r9,%r11
- selhhhrle %r6,%r9,%r11
- selhhhrnh %r6,%r9,%r11
- selhhhrnp %r6,%r9,%r11
- selhhhrno %r6,%r9,%r11
+ selfhr %r6,%r9,%r11,13
+ selfhro %r6,%r9,%r11
+ selfhrh %r6,%r9,%r11
+ selfhrp %r6,%r9,%r11
+ selfhrnle %r6,%r9,%r11
+ selfhrl %r6,%r9,%r11
+ selfhrm %r6,%r9,%r11
+ selfhrnhe %r6,%r9,%r11
+ selfhrlh %r6,%r9,%r11
+ selfhrne %r6,%r9,%r11
+ selfhrnz %r6,%r9,%r11
+ selfhre %r6,%r9,%r11
+ selfhrz %r6,%r9,%r11
+ selfhrnlh %r6,%r9,%r11
+ selfhrhe %r6,%r9,%r11
+ selfhrnl %r6,%r9,%r11
+ selfhrnm %r6,%r9,%r11
+ selfhrle %r6,%r9,%r11
+ selfhrnh %r6,%r9,%r11
+ selfhrnp %r6,%r9,%r11
+ selfhrno %r6,%r9,%r11
vlbr %v15,4000(%r6,%r9),13
vlbrh %v15,4000(%r6,%r9)
vlbrf %v15,4000(%r6,%r9)
@@ -124,11 +124,8 @@ foo:
vstrsf %v15,%v17,%v20,%v24
vstrsf %v15,%v17,%v20,%v24,13
vstrszb %v15,%v17,%v20,%v24
- vstrszb %v15,%v17,%v20,%v24,13
vstrszh %v15,%v17,%v20,%v24
- vstrszh %v15,%v17,%v20,%v24,13
vstrszf %v15,%v17,%v20,%v24
- vstrszf %v15,%v17,%v20,%v24,13
vcfps %v15,%v17,13,12,11
vcefb %v15,%v17,13,12
wcefb %v15,%v17,13,12
diff -rup binutils.orig/opcodes/s390-opc.txt binutils-2.30/opcodes/s390-opc.txt
--- binutils.orig/opcodes/s390-opc.txt 2019-06-18 13:41:27.578054171 +0100
+++ binutils-2.30/opcodes/s390-opc.txt 2019-06-18 13:48:01.505295102 +0100
@@ -1889,106 +1889,120 @@ e70000000036 vlm VRS_VVRDU "vector load
e7000000000e vst VRX_VRRDU "vector store" arch12 zarch optparm
e7000000003e vstm VRS_VVRDU "vector store multiple" arch12 zarch optparm
+
# arch13 instructions
-b9f5 ncrk RRF_R0RR2 " " arch13 zarch
-b9e5 ncgrk RRF_R0RR2 " " arch13 zarch
-e50a mvcrl SSE_RDRD " " arch13 zarch
-b974 nnrk RRF_R0RR2 " " arch13 zarch
-b964 nngrk RRF_R0RR2 " " arch13 zarch
-b976 nork RRF_R0RR2 " " arch13 zarch
-b966 nogrk RRF_R0RR2 " " arch13 zarch
-b977 nxrk RRF_R0RR2 " " arch13 zarch
-b967 nxgrk RRF_R0RR2 " " arch13 zarch
-b975 ocrk RRF_R0RR2 " " arch13 zarch
-b965 ocgrk RRF_R0RR2 " " arch13 zarch
-b9e1 popcnt RRF_U0RR " " arch13 zarch optparm
-b9f0 selr RRF_RURR " " arch13 zarch
-b9f00000 selr*20 RRF_R0RR3 " " arch13 zarch
-b9e3 selgr RRF_RURR " " arch13 zarch
-b9e30000 selgr*20 RRF_R0RR3 " " arch13 zarch
-b9c0 selhhhr RRF_RURR " " arch13 zarch
-b9c00000 selhhhr*20 RRF_R0RR3 " " arch13 zarch
-
-e60000000006 vlbr VRX_VRRDU " " arch13 zarch
-e60000001006 vlbrh VRX_VRRD " " arch13 zarch
-e60000002006 vlbrf VRX_VRRD " " arch13 zarch
-e60000003006 vlbrg VRX_VRRD " " arch13 zarch
-e60000004006 vlbrq VRX_VRRD " " arch13 zarch
-
-e60000000007 vler VRX_VRRDU " " arch13 zarch
-e60000001007 vlerh VRX_VRRD " " arch13 zarch
-e60000002007 vlerf VRX_VRRD " " arch13 zarch
-e60000003007 vlerg VRX_VRRD " " arch13 zarch
-
-e60000000004 vllebrz VRX_VRRDU " " arch13 zarch
-e60000001004 vllebrzh VRX_VRRD " " arch13 zarch
-e60000002004 vllebrzf VRX_VRRD " " arch13 zarch
-e60000003004 ldrv VRX_VRRD " " arch13 zarch
-e60000003004 vllebrzg VRX_VRRD " " arch13 zarch
-e60000006004 lerv VRX_VRRD " " arch13 zarch
-e60000006004 vllebrze VRX_VRRD " " arch13 zarch
-
-e60000000001 vlebrh VRX_VRRDU " " arch13 zarch
-e60000000003 vlebrf VRX_VRRDU " " arch13 zarch
-e60000000002 vlebrg VRX_VRRDU " " arch13 zarch
-
-e60000000005 vlbrrep VRX_VRRDU " " arch13 zarch
-e60000001005 vlbrreph VRX_VRRD " " arch13 zarch
-e60000002005 vlbrrepf VRX_VRRD " " arch13 zarch
-e60000003005 vlbrrepg VRX_VRRD " " arch13 zarch
-
-e6000000000e vstbr VRX_VRRDU " " arch13 zarch
-e6000000100e vstbrh VRX_VRRD " " arch13 zarch
-e6000000200e vstbrf VRX_VRRD " " arch13 zarch
-e6000000300e vstbrg VRX_VRRD " " arch13 zarch
-e6000000400e vstbrq VRX_VRRD " " arch13 zarch
-
-e6000000000f vster VRX_VRRDU " " arch13 zarch
-e6000000100f vsterh VRX_VRRD " " arch13 zarch
-e6000000200f vsterf VRX_VRRD " " arch13 zarch
-e6000000300f vsterg VRX_VRRD " " arch13 zarch
-
-e60000000009 vstebrh VRX_VRRDU " " arch13 zarch
-e6000000000b vstebrf VRX_VRRDU " " arch13 zarch
-e6000000000b sterv VRX_VRRD " " arch13 zarch
-e6000000000a vstebrg VRX_VRRDU " " arch13 zarch
-e6000000000a stdrv VRX_VRRD " " arch13 zarch
-
-e70000000086 vsld VRI_VVV0U " " arch13 zarch
-e70000000087 vsrd VRI_VVV0U " " arch13 zarch
-
-e7000000008b vstrs VRR_VVVUU0V " " arch13 zarch optparm
-
-e7000000008b vstrsb VRR_VVVU0VB " " arch13 zarch optparm
-e7000100008b vstrsh VRR_VVVU0VB " " arch13 zarch optparm
-e7000200008b vstrsf VRR_VVVU0VB " " arch13 zarch optparm
-
-e7000020008b vstrszb VRR_VVVU0VB2 " " arch13 zarch optparm
-e7000120008b vstrszh VRR_VVVU0VB2 " " arch13 zarch optparm
-e7000220008b vstrszf VRR_VVVU0VB2 " " arch13 zarch optparm
-
-e700000000c3 vcfps VRR_VV0UUU " " arch13 zarch
-e700000020c3 vcefb VRR_VV0UU " " arch13 zarch
-e700000820c3 wcefb VRR_VV0UU8 " " arch13 zarch
-
-e700000000c1 vcfpl VRR_VV0UUU " " arch13 zarch
-e700000020c1 vcelfb VRR_VV0UU " " arch13 zarch
-e700000820c1 wcelfb VRR_VV0UU8 " " arch13 zarch
-
-e700000000c2 vcsfp VRR_VV0UUU " " arch13 zarch
-e700000020c2 vcfeb VRR_VV0UU " " arch13 zarch
-e700000820c2 wcfeb VRR_VV0UU8 " " arch13 zarch
-
-e700000000c0 vclfp VRR_VV0UUU " " arch13 zarch
-e700000020c0 vclfeb VRR_VV0UU " " arch13 zarch
-e700000820c0 wclfeb VRR_VV0UU8 " " arch13 zarch
-b939 dfltcc RRF_R0RR2 " " arch13 zarch
+# Miscellaneous Instruction Extensions Facility 2
+
+b9f5 ncrk RRF_R0RR2 "and with complement 32 bit" arch13 zarch
+b9e5 ncgrk RRF_R0RR2 "and with complement 64 bit" arch13 zarch
+e50a mvcrl SSE_RDRD "move right to left" arch13 zarch
+b974 nnrk RRF_R0RR2 "nand 32 bit" arch13 zarch
+b964 nngrk RRF_R0RR2 "nand 64 bit" arch13 zarch
+b976 nork RRF_R0RR2 "nor 32 bit" arch13 zarch
+b966 nogrk RRF_R0RR2 "nor 64 bit" arch13 zarch
+b977 nxrk RRF_R0RR2 "not exclusive or 32 bit" arch13 zarch
+b967 nxgrk RRF_R0RR2 "not exclusive or 64 bit" arch13 zarch
+b975 ocrk RRF_R0RR2 "or with complement 32 bit" arch13 zarch
+b965 ocgrk RRF_R0RR2 "or with complement 64 bit" arch13 zarch
+b9e1 popcnt RRF_U0RR "population count arch13" arch13 zarch optparm
+b9f0 selr RRF_RURR "select 32 bit" arch13 zarch
+b9f00000 selr*20 RRF_R0RR3 "select 32 bit" arch13 zarch
+b9e3 selgr RRF_RURR "select 64 bit" arch13 zarch
+b9e30000 selgr*20 RRF_R0RR3 "select 64 bit" arch13 zarch
+b9c0 selfhr RRF_RURR "select high" arch13 zarch
+b9c00000 selfhr*20 RRF_R0RR3 "select high" arch13 zarch
+
+# Vector Enhancements Facility 2
+
+e60000000006 vlbr VRX_VRRDU "vector load byte reversed elements" arch13 zarch
+e60000001006 vlbrh VRX_VRRD "vector load byte reversed halfword elements" arch13 zarch
+e60000002006 vlbrf VRX_VRRD "vector load byte reversed word elements" arch13 zarch
+e60000003006 vlbrg VRX_VRRD "vector load byte reversed doubleword elements" arch13 zarch
+e60000004006 vlbrq VRX_VRRD "vector load byte reversed quadword elements" arch13 zarch
+
+e60000000007 vler VRX_VRRDU "vector load elements reversed" arch13 zarch
+e60000001007 vlerh VRX_VRRD "vector load halfword elements reversed" arch13 zarch
+e60000002007 vlerf VRX_VRRD "vector load word elements reversed" arch13 zarch
+e60000003007 vlerg VRX_VRRD "vector load doubleword elements reversed" arch13 zarch
+
+e60000000004 vllebrz VRX_VRRDU "vector load byte reversed element and zero" arch13 zarch
+e60000001004 vllebrzh VRX_VRRD "vector load byte reversed halfword element and zero" arch13 zarch
+e60000002004 vllebrzf VRX_VRRD "vector load byte reversed word element and zero" arch13 zarch
+e60000003004 ldrv VRX_VRRD "load byte reversed doubleword" arch13 zarch
+e60000003004 vllebrzg VRX_VRRD "vector load byte reversed doubleword element and zero" arch13 zarch
+e60000006004 lerv VRX_VRRD "load byte reversed word" arch13 zarch
+e60000006004 vllebrze VRX_VRRD "vector load byte reversed word element left-aligned and zero" arch13 zarch
+
+e60000000001 vlebrh VRX_VRRDU "vector load byte reversed halfword element" arch13 zarch
+e60000000003 vlebrf VRX_VRRDU "vector load byte reversed word element" arch13 zarch
+e60000000002 vlebrg VRX_VRRDU "vector load byte reversed doubleword element" arch13 zarch
+
+e60000000005 vlbrrep VRX_VRRDU "vector load byte reversed element and replicate" arch13 zarch
+e60000001005 vlbrreph VRX_VRRD "vector load byte reversed halfword element and replicate" arch13 zarch
+e60000002005 vlbrrepf VRX_VRRD "vector load byte reversed word element and replicate" arch13 zarch
+e60000003005 vlbrrepg VRX_VRRD "vector load byte reversed doubleword element and replicate" arch13 zarch
+
+e6000000000e vstbr VRX_VRRDU "vector store byte reversed elements" arch13 zarch
+e6000000100e vstbrh VRX_VRRD "vector store byte reversed halfword elements" arch13 zarch
+e6000000200e vstbrf VRX_VRRD "vector store byte reversed word elements" arch13 zarch
+e6000000300e vstbrg VRX_VRRD "vector store byte reversed doubleword elements" arch13 zarch
+e6000000400e vstbrq VRX_VRRD "vector store byte reversed quadword elements" arch13 zarch
+
+e6000000000f vster VRX_VRRDU "vector store elements reversed" arch13 zarch
+e6000000100f vsterh VRX_VRRD "vector store halfword elements reversed" arch13 zarch
+e6000000200f vsterf VRX_VRRD "vector store word elements reversed" arch13 zarch
+e6000000300f vsterg VRX_VRRD "vector store doubleword elements reversed" arch13 zarch
+
+e60000000009 vstebrh VRX_VRRDU "vector store byte reversed halfword element" arch13 zarch
+e6000000000b vstebrf VRX_VRRDU "vector store byte reversed word element" arch13 zarch
+e6000000000b sterv VRX_VRRD "store byte reversed word" arch13 zarch
+e6000000000a vstebrg VRX_VRRDU "vector store byte reversed doubleword element" arch13 zarch
+e6000000000a stdrv VRX_VRRD "store byte reversed doubleword" arch13 zarch
+
+e70000000086 vsld VRI_VVV0U "vector shift left double by bit" arch13 zarch
+e70000000087 vsrd VRI_VVV0U "vector shift right double by bit" arch13 zarch
+
+e7000000008b vstrs VRR_VVVUU0V "vector string search" arch13 zarch optparm
+
+e7000000008b vstrsb VRR_VVVU0VB "vector string search byte" arch13 zarch optparm
+e7000100008b vstrsh VRR_VVVU0VB "vector string search halfword" arch13 zarch optparm
+e7000200008b vstrsf VRR_VVVU0VB "vector string search word" arch13 zarch optparm
+
+e7000020008b vstrszb VRR_VVV0V "vector string search byte zero" arch13 zarch
+e7000120008b vstrszh VRR_VVV0V "vector string search halfword zero" arch13 zarch
+e7000220008b vstrszf VRR_VVV0V "vector string search word zero" arch13 zarch
+
+e700000000c3 vcfps VRR_VV0UUU "vector fp convert from fixed" arch13 zarch
+e700000020c3 vcefb VRR_VV0UU "vector fp convert from fixed 32 bit" arch13 zarch
+e700000820c3 wcefb VRR_VV0UU8 "vector fp convert from fixed 32 bit" arch13 zarch
+
+e700000000c1 vcfpl VRR_VV0UUU "vector fp convert from logical" arch13 zarch
+e700000020c1 vcelfb VRR_VV0UU "vector fp convert from logical 32 bit" arch13 zarch
+e700000820c1 wcelfb VRR_VV0UU8 "vector fp convert from logical 32 bit" arch13 zarch
+
+e700000000c2 vcsfp VRR_VV0UUU "vector fp convert to fixed" arch13 zarch
+e700000020c2 vcfeb VRR_VV0UU "vector fp convert to fixed 32 bit" arch13 zarch
+e700000820c2 wcfeb VRR_VV0UU8 "vector fp convert to fixed 32 bit" arch13 zarch
+
+e700000000c0 vclfp VRR_VV0UUU "vector fp convert to logical" arch13 zarch
+e700000020c0 vclfeb VRR_VV0UU "vector fp convert to logical 32 bit" arch13 zarch
+e700000820c0 wclfeb VRR_VV0UU8 "vector fp convert to logical 32 bit" arch13 zarch
+
+# Deflate conversion facility
+
+b939 dfltcc RRF_R0RR2 "deflate conversion call" arch13 zarch
+
+# Enhanced-Sort Facility
+
+b938 sortl RRE_RR "sort lists" arch13 zarch
+
+# Vector packed decimal enhancement facility
-b938 sortl RRE_RR " " arch13 zarch
+e60000000050 vcvb VRR_RV0UU "vector convert to binary 32 bit" arch13 zarch optparm
+e60000000052 vcvbg VRR_RV0UU "vector convert to binary 64 bit" arch13 zarch optparm
-e60000000050 vcvb VRR_RV0UU " " arch13 zarch optparm
-e60000000052 vcvbg VRR_RV0UU " " arch13 zarch optparm
+# Message Security Assist Extension 9
-b93a kdsa RRE_RR " " arch13 zarch
+b93a kdsa RRE_RR "compute digital signature authentication" arch13 zarch
Only in binutils-2.30/opcodes: s390-opc.txt.orig

View File

@ -0,0 +1,27 @@
--- binutils.orig/bfd/elf.c 2018-10-19 11:42:10.107277490 +0100
+++ binutils-2.31.1/bfd/elf.c 2018-10-19 11:44:33.607105801 +0100
@@ -830,7 +830,13 @@ setup_group (bfd *abfd, Elf_Internal_Shd
}
}
- if (elf_group_name (newsect) == NULL)
+ if (elf_group_name (newsect) == NULL
+ /* OS specific sections might be in a group (eg ARM's ARM_EXIDX section)
+ but they will not have been added to the group because they do not
+ have contents that the ELF code in the BFD library knows how to
+ process. This is OK though - we rely upon the target backends to
+ handle these sections for us. */
+ && hdr->sh_type < SHT_LOOS)
{
/* xgettext:c-format */
_bfd_error_handler (_("%pB: no group info for section '%pA'"),
@@ -936,7 +942,8 @@ _bfd_elf_setup_sections (bfd *abfd)
else if (idx->shdr->bfd_section)
elf_sec_group (idx->shdr->bfd_section) = shdr->bfd_section;
else if (idx->shdr->sh_type != SHT_RELA
- && idx->shdr->sh_type != SHT_REL)
+ && idx->shdr->sh_type != SHT_REL
+ && idx->shdr->sh_type < SHT_LOOS)
{
/* There are some unknown sections in the group. */
_bfd_error_handler

File diff suppressed because it is too large Load Diff

3331
SPECS/binutils.spec Normal file

File diff suppressed because it is too large Load Diff