basebuilder_pel7x64builder0
7 years ago
44 changed files with 23896 additions and 0 deletions
@ -0,0 +1,38 @@ |
|||||||
|
# Generate OUTPUT_FORMAT line for .so files from the system linker output. |
||||||
|
# Imported from glibc/Makerules. |
||||||
|
|
||||||
|
/ld.*[ ]-E[BL]/b f |
||||||
|
/collect.*[ ]-E[BL]/b f |
||||||
|
/OUTPUT_FORMAT[^)]*$/{N |
||||||
|
s/\n[ ]*/ / |
||||||
|
} |
||||||
|
t o |
||||||
|
: o |
||||||
|
s/^.*OUTPUT_FORMAT(\([^,]*\), \1, \1).*$/OUTPUT_FORMAT(\1)/ |
||||||
|
t q |
||||||
|
s/^.*OUTPUT_FORMAT(\([^,]*\), \([^,]*\), \([^,]*\)).*$/\1,\2,\3/ |
||||||
|
t s |
||||||
|
s/^.*OUTPUT_FORMAT(\([^,)]*\).*$)/OUTPUT_FORMAT(\1)/ |
||||||
|
t q |
||||||
|
d |
||||||
|
: s |
||||||
|
s/"//g |
||||||
|
G |
||||||
|
s/\n// |
||||||
|
s/^\([^,]*\),\([^,]*\),\([^,]*\),B/OUTPUT_FORMAT(\2)/p |
||||||
|
s/^\([^,]*\),\([^,]*\),\([^,]*\),L/OUTPUT_FORMAT(\3)/p |
||||||
|
s/^\([^,]*\),\([^,]*\),\([^,]*\)/OUTPUT_FORMAT(\1)/p |
||||||
|
/,/s|^|*** BUG in libc/scripts/output-format.sed *** |p |
||||||
|
q |
||||||
|
: q |
||||||
|
s/"//g |
||||||
|
p |
||||||
|
q |
||||||
|
: f |
||||||
|
s/^.*[ ]-E\([BL]\)[ ].*$/,\1/ |
||||||
|
t h |
||||||
|
s/^.*[ ]-E\([BL]\)$/,\1/ |
||||||
|
t h |
||||||
|
d |
||||||
|
: h |
||||||
|
h |
@ -0,0 +1,14 @@ |
|||||||
|
*** ../binutils-2.23.51.0.2.orig/bfd/elf64-ppc.c 2012-09-11 12:13:00.637448573 +0100 |
||||||
|
--- bfd/elf64-ppc.c 2012-09-11 12:13:17.922449052 +0100 |
||||||
|
*************** ppc64_elf_relocate_section (bfd *output_ |
||||||
|
*** 13523,13528 **** |
||||||
|
--- 13523,13531 ---- |
||||||
|
{ |
||||||
|
BFD_ASSERT (h->elf.dynindx != -1); |
||||||
|
outrel.r_info = ELF64_R_INFO (h->elf.dynindx, r_type); |
||||||
|
+ if (h->elf.dynindx == -1 |
||||||
|
+ && h->elf.root.type == bfd_link_hash_undefweak) |
||||||
|
+ memset (&outrel, 0, sizeof outrel); |
||||||
|
} |
||||||
|
else |
||||||
|
{ |
@ -0,0 +1,11 @@ |
|||||||
|
--- binutils-2.26.orig/bfd/merge.c 2016-01-25 10:11:33.505289018 +0000 |
||||||
|
+++ binutils-2.26/bfd/merge.c 2016-01-25 10:19:56.961381656 +0000 |
||||||
|
@@ -334,7 +334,7 @@ sec_merge_emit (bfd *abfd, struct sec_me |
||||||
|
|
||||||
|
/* Trailing alignment needed? */ |
||||||
|
off = sec->size - off; |
||||||
|
- if (off != 0) |
||||||
|
+ if (off != 0 && alignment_power) |
||||||
|
{ |
||||||
|
if (contents) |
||||||
|
memcpy (contents + offset, pad, off); |
@ -0,0 +1,302 @@ |
|||||||
|
diff -rcp ../binutils-2.20.51.0.7.original/bfd/configure ./bfd/configure |
||||||
|
*** ../binutils-2.20.51.0.7.original/bfd/configure 2010-04-08 14:53:48.000000000 +0100 |
||||||
|
--- ./bfd/configure 2010-04-08 14:56:50.000000000 +0100 |
||||||
|
*************** fi |
||||||
|
*** 10762,10771 **** |
||||||
|
# before this can be enabled. |
||||||
|
hardcode_into_libs=yes |
||||||
|
|
||||||
|
# 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" |
||||||
|
fi |
||||||
|
|
||||||
|
# We used to test for /lib/ld.so.1 and disable shared libraries on |
||||||
|
--- 10762,10795 ---- |
||||||
|
# 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${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 |
||||||
|
*** ../binutils-2.20.51.0.7.original/binutils/configure 2010-04-08 14:53:45.000000000 +0100 |
||||||
|
--- ./binutils/configure 2010-04-08 14:56:21.000000000 +0100 |
||||||
|
*************** fi |
||||||
|
*** 10560,10569 **** |
||||||
|
# before this can be enabled. |
||||||
|
hardcode_into_libs=yes |
||||||
|
|
||||||
|
# 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" |
||||||
|
fi |
||||||
|
|
||||||
|
# We used to test for /lib/ld.so.1 and disable shared libraries on |
||||||
|
--- 10560,10593 ---- |
||||||
|
# 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${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 |
||||||
|
*** ../binutils-2.20.51.0.7.original/gas/configure 2010-04-08 14:53:47.000000000 +0100 |
||||||
|
--- ./gas/configure 2010-04-08 14:57:24.000000000 +0100 |
||||||
|
*************** fi |
||||||
|
*** 10547,10556 **** |
||||||
|
# before this can be enabled. |
||||||
|
hardcode_into_libs=yes |
||||||
|
|
||||||
|
# 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" |
||||||
|
fi |
||||||
|
|
||||||
|
# We used to test for /lib/ld.so.1 and disable shared libraries on |
||||||
|
--- 10547,10580 ---- |
||||||
|
# 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${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 |
||||||
|
*** ../binutils-2.20.51.0.7.original/gprof/configure 2010-04-08 14:53:45.000000000 +0100 |
||||||
|
--- ./gprof/configure 2010-04-08 14:57:50.000000000 +0100 |
||||||
|
*************** fi |
||||||
|
*** 10485,10494 **** |
||||||
|
# before this can be enabled. |
||||||
|
hardcode_into_libs=yes |
||||||
|
|
||||||
|
# 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" |
||||||
|
fi |
||||||
|
|
||||||
|
# We used to test for /lib/ld.so.1 and disable shared libraries on |
||||||
|
--- 10485,10518 ---- |
||||||
|
# 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${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 |
||||||
|
*** ../binutils-2.20.51.0.7.original/ld/configure 2010-04-08 14:53:44.000000000 +0100 |
||||||
|
--- ./ld/configure 2010-04-08 14:58:21.000000000 +0100 |
||||||
|
*************** fi |
||||||
|
*** 10966,10975 **** |
||||||
|
# before this can be enabled. |
||||||
|
hardcode_into_libs=yes |
||||||
|
|
||||||
|
# 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" |
||||||
|
fi |
||||||
|
|
||||||
|
# We used to test for /lib/ld.so.1 and disable shared libraries on |
||||||
|
--- 10966,10999 ---- |
||||||
|
# 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${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 |
||||||
|
*** ../binutils-2.20.51.0.7.original/opcodes/configure 2010-04-08 14:53:45.000000000 +0100 |
||||||
|
--- ./opcodes/configure 2010-04-08 14:59:10.000000000 +0100 |
||||||
|
*************** fi |
||||||
|
*** 10496,10505 **** |
||||||
|
# before this can be enabled. |
||||||
|
hardcode_into_libs=yes |
||||||
|
|
||||||
|
# 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" |
||||||
|
fi |
||||||
|
|
||||||
|
# We used to test for /lib/ld.so.1 and disable shared libraries on |
||||||
|
--- 10496,10529 ---- |
||||||
|
# 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${libsuff} /usr/lib${libsuff} $lt_ld_extra" |
||||||
|
fi |
||||||
|
|
||||||
|
# We used to test for /lib/ld.so.1 and disable shared libraries on |
@ -0,0 +1,21 @@ |
|||||||
|
--- a/bfd/Makefile.am 2012-03-06 14:00:33.229957572 +0000 |
||||||
|
+++ b/bfd/Makefile.am 2012-04-27 16:46:05.410974817 +0100 |
||||||
|
@@ -18,7 +18,7 @@ |
||||||
|
bfdlibdir = @bfdlibdir@ |
||||||
|
bfdincludedir = @bfdincludedir@ |
||||||
|
bfdlib_LTLIBRARIES = libbfd.la |
||||||
|
-bfdinclude_HEADERS = $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/bfdlink.h |
||||||
|
+bfdinclude_HEADERS = $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/bfdlink.h $(INCDIR)/demangle.h |
||||||
|
else !INSTALL_LIBBFD |
||||||
|
# Empty these so that the respective installation directories will not be created. |
||||||
|
bfdlibdir = |
||||||
|
--- binutils-2.26.orig/bfd/Makefile.in 2016-01-25 10:23:35.054721634 +0000 |
||||||
|
+++ binutils-2.26/bfd/Makefile.in 2016-01-25 10:25:59.292607840 +0000 |
||||||
|
@@ -350,6 +350,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@ $(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 |
@ -0,0 +1,32 @@ |
|||||||
|
*** ../binutils-2.22.52.0.4.orig/bfd/bfd-in.h 2012-08-02 10:56:34.561769686 +0100 |
||||||
|
--- bfd/bfd-in.h 2012-08-02 11:13:27.134797755 +0100 |
||||||
|
*************** |
||||||
|
*** 25,35 **** |
||||||
|
#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 |
||||||
|
--- 25,30 ---- |
||||||
|
*** ../binutils-2.22.52.0.4.orig/bfd/bfd-in2.h 2012-08-02 10:56:34.349769680 +0100 |
||||||
|
--- bfd/bfd-in2.h 2012-08-02 11:13:40.015798113 +0100 |
||||||
|
*************** |
||||||
|
*** 32,42 **** |
||||||
|
#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 |
||||||
|
--- 32,37 ---- |
@ -0,0 +1,38 @@ |
|||||||
|
--- a/bfd/opncls.c 2013-03-14 11:25:30.338306122 +0000 |
||||||
|
+++ b/bfd/opncls.c 2013-03-14 12:20:21.686397360 +0000 |
||||||
|
@@ -1297,6 +1297,8 @@ |
||||||
|
bfd_malloc (strlen (debug_file_directory) + 1 |
||||||
|
+ (canon_dirlen > dirlen ? canon_dirlen : dirlen) |
||||||
|
+ strlen (".debug/") |
||||||
|
+#define FEDORA_LIB_DEBUG_DIR "/usr/lib/debug/" |
||||||
|
+ + strlen (FEDORA_LIB_DEBUG_DIR) + strlen ("usr/") |
||||||
|
+ strlen (base) |
||||||
|
+ 1); |
||||||
|
if (debugfile == NULL) |
||||||
|
@@ -1332,6 +1334,26 @@ |
||||||
|
if (check_func (debugfile, crc32)) |
||||||
|
goto found; |
||||||
|
|
||||||
|
+ /* Then try in the global debug dir for Fedora libraries. */ |
||||||
|
+ sprintf (debugfile, "%s%s%s", FEDORA_LIB_DEBUG_DIR, dir, base); |
||||||
|
+ if (separate_debug_file_exists (debugfile, crc32)) |
||||||
|
+ { |
||||||
|
+ free (base); |
||||||
|
+ free (dir); |
||||||
|
+ free (canon_dir); |
||||||
|
+ return debugfile; |
||||||
|
+ } |
||||||
|
+ |
||||||
|
+ /* Then try in the usr subdirectory of the global debug dir for Fedora libraries. */ |
||||||
|
+ sprintf (debugfile, "%s/usr%s%s", FEDORA_LIB_DEBUG_DIR, dir, base); |
||||||
|
+ if (separate_debug_file_exists (debugfile, crc32)) |
||||||
|
+ { |
||||||
|
+ free (base); |
||||||
|
+ free (dir); |
||||||
|
+ free (canon_dir); |
||||||
|
+ return debugfile; |
||||||
|
+ } |
||||||
|
+ |
||||||
|
/* Then try in the global debugfile directory. */ |
||||||
|
strcpy (debugfile, debug_file_directory); |
||||||
|
dirlen = strlen (debug_file_directory) - 1; |
@ -0,0 +1,38 @@ |
|||||||
|
diff -up binutils-2.25.orig/bfd/configure.ac binutils-2.25/bfd/configure.ac |
||||||
|
--- binutils-2.25.orig/bfd/configure.ac 2014-12-24 10:34:45.590491143 +0000 |
||||||
|
+++ binutils-2.25/bfd/configure.ac 2014-12-24 10:36:12.997981992 +0000 |
||||||
|
@@ -183,11 +183,13 @@ if test "x${ac_cv_sizeof_long}" = "x8"; |
||||||
|
BFD_HOST_64BIT_LONG=1 |
||||||
|
test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long" |
||||||
|
test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long" |
||||||
|
-elif test "x${ac_cv_sizeof_long_long}" = "x8"; then |
||||||
|
+fi |
||||||
|
+if test "x${ac_cv_sizeof_long_long}" = "x8"; then |
||||||
|
BFD_HOST_64BIT_LONG_LONG=1 |
||||||
|
test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long" |
||||||
|
test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long long" |
||||||
|
- if test "x${ac_cv_sizeof_void_p}" = "x8"; then |
||||||
|
+ if test "x${ac_cv_sizeof_void_p}" = "x8" \ |
||||||
|
+ -a "x${ac_cv_sizeof_long}" != "x8"; then |
||||||
|
BFD_HOSTPTR_T="unsigned long long" |
||||||
|
fi |
||||||
|
fi |
||||||
|
diff -up ../binutils-2.20.51.0.7.original/bfd/configure ./bfd/configure |
||||||
|
--- a/bfd/configure 2010-04-08 15:23:58.000000000 +0100 |
||||||
|
+++ b/bfd/configure 2010-04-08 15:24:06.000000000 +0100 |
||||||
|
@@ -12819,11 +12819,13 @@ |
||||||
|
BFD_HOST_64BIT_LONG=1 |
||||||
|
test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long" |
||||||
|
test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long" |
||||||
|
-elif test "x${ac_cv_sizeof_long_long}" = "x8"; then |
||||||
|
+fi |
||||||
|
+if test "x${ac_cv_sizeof_long_long}" = "x8"; then |
||||||
|
BFD_HOST_64BIT_LONG_LONG=1 |
||||||
|
test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long" |
||||||
|
test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long long" |
||||||
|
- if test "x${ac_cv_sizeof_void_p}" = "x8"; then |
||||||
|
+ if test "x${ac_cv_sizeof_void_p}" = "x8" \ |
||||||
|
+ -a "x${ac_cv_sizeof_long}" != "x8"; then |
||||||
|
BFD_HOSTPTR_T="unsigned long long" |
||||||
|
fi |
||||||
|
fi |
@ -0,0 +1,44 @@ |
|||||||
|
--- binutils-2.26.orig/bfd/Makefile.am 2016-01-25 10:11:33.505289018 +0000 |
||||||
|
+++ binutils-2.26/bfd/Makefile.am 2016-01-25 10:13:23.489964145 +0000 |
||||||
|
@@ -1043,8 +1043,8 @@ DISTCLEANFILES = $(BUILD_CFILES) $(BUILD |
||||||
|
bfdver.h: $(srcdir)/version.h $(srcdir)/development.sh $(srcdir)/Makefile.in |
||||||
|
@echo "creating $@" |
||||||
|
@bfd_version=`echo "$(VERSION)" | $(SED) -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\ |
||||||
|
- bfd_version_string="\"$(VERSION)\"" ;\ |
||||||
|
- bfd_soversion="$(VERSION)" ;\ |
||||||
|
+ bfd_version_string="\"$(VERSION)-%{release}\"" ;\ |
||||||
|
+ bfd_soversion="$(VERSION)-%{release}" ;\ |
||||||
|
bfd_version_package="\"$(PKGVERSION)\"" ;\ |
||||||
|
report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\ |
||||||
|
. $(srcdir)/development.sh ;\ |
||||||
|
@@ -1055,7 +1055,7 @@ bfdver.h: $(srcdir)/version.h $(srcdir)/ |
||||||
|
fi ;\ |
||||||
|
$(SED) -e "s,@bfd_version@,$$bfd_version," \ |
||||||
|
-e "s,@bfd_version_string@,$$bfd_version_string," \ |
||||||
|
- -e "s,@bfd_version_package@,$$bfd_version_package," \ |
||||||
|
+ -e "s,@bfd_version_package@,\"version \"," \ |
||||||
|
-e "s,@report_bugs_to@,$$report_bugs_to," \ |
||||||
|
< $(srcdir)/version.h > $@; \ |
||||||
|
echo "$${bfd_soversion}" > libtool-soversion |
||||||
|
--- binutils-2.26.orig/bfd/Makefile.in 2016-01-25 10:11:33.505289018 +0000 |
||||||
|
+++ binutils-2.26/bfd/Makefile.in 2016-01-25 10:14:17.818297941 +0000 |
||||||
|
@@ -2111,8 +2111,8 @@ stmp-lcoff-h: $(LIBCOFF_H_FILES) |
||||||
|
bfdver.h: $(srcdir)/version.h $(srcdir)/development.sh $(srcdir)/Makefile.in |
||||||
|
@echo "creating $@" |
||||||
|
@bfd_version=`echo "$(VERSION)" | $(SED) -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\ |
||||||
|
- bfd_version_string="\"$(VERSION)\"" ;\ |
||||||
|
- bfd_soversion="$(VERSION)" ;\ |
||||||
|
+ bfd_version_string="\"$(VERSION)-%{release}\"" ;\ |
||||||
|
+ bfd_soversion="$(VERSION)-%{release}" ;\ |
||||||
|
bfd_version_package="\"$(PKGVERSION)\"" ;\ |
||||||
|
report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\ |
||||||
|
. $(srcdir)/development.sh ;\ |
||||||
|
@@ -2123,7 +2123,7 @@ bfdver.h: $(srcdir)/version.h $(srcdir)/ |
||||||
|
fi ;\ |
||||||
|
$(SED) -e "s,@bfd_version@,$$bfd_version," \ |
||||||
|
-e "s,@bfd_version_string@,$$bfd_version_string," \ |
||||||
|
- -e "s,@bfd_version_package@,$$bfd_version_package," \ |
||||||
|
+ -e "s,@bfd_version_package@,\"version \"," \ |
||||||
|
-e "s,@report_bugs_to@,$$report_bugs_to," \ |
||||||
|
< $(srcdir)/version.h > $@; \ |
||||||
|
echo "$${bfd_soversion}" > libtool-soversion |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,10 @@ |
|||||||
|
--- binutils.orig/include/dwarf2.def 2017-08-08 17:40:39.295382994 +0100 |
||||||
|
+++ binutils-2.27/include/dwarf2.def 2017-08-08 17:44:03.672045965 +0100 |
||||||
|
@@ -310,6 +310,7 @@ DW_AT (DW_AT_enum_class, 0x6d) |
||||||
|
DW_AT (DW_AT_linkage_name, 0x6e) |
||||||
|
/* DWARF 5. */ |
||||||
|
DW_AT (DW_AT_noreturn, 0x87) |
||||||
|
+DW_AT (DW_AT_export_symbols, 0x89) |
||||||
|
|
||||||
|
DW_AT_DUP (DW_AT_lo_user, 0x2000) /* Implementation-defined range start. */ |
||||||
|
DW_AT_DUP (DW_AT_hi_user, 0x3fff) /* Implementation-defined range end. */ |
@ -0,0 +1,367 @@ |
|||||||
|
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c |
||||||
|
index 1edf2a0..e27f067 100644 (file) |
||||||
|
--- a/bfd/elfnn-aarch64.c |
||||||
|
+++ b/bfd/elfnn-aarch64.c |
||||||
|
@@ -6869,6 +6889,31 @@ elfNN_aarch64_gc_sweep_hook (bfd *abfd, |
||||||
|
return TRUE; |
||||||
|
} |
||||||
|
|
||||||
|
+/* Return true if we need copy relocation against EH. */ |
||||||
|
+ |
||||||
|
+static bfd_boolean |
||||||
|
+need_copy_relocation_p (struct elf_aarch64_link_hash_entry *eh) |
||||||
|
+{ |
||||||
|
+ struct elf_dyn_relocs *p; |
||||||
|
+ asection *s; |
||||||
|
+ |
||||||
|
+ for (p = eh->dyn_relocs; p != NULL; p = p->next) |
||||||
|
+ { |
||||||
|
+ /* If there is any pc-relative reference, we need to keep copy relocation |
||||||
|
+ to avoid propagating the relocation into runtime that current glibc |
||||||
|
+ does not support. */ |
||||||
|
+ if (p->pc_count) |
||||||
|
+ return TRUE; |
||||||
|
+ |
||||||
|
+ s = p->sec->output_section; |
||||||
|
+ /* Need copy relocation if it's against read-only section. */ |
||||||
|
+ if (s != NULL && (s->flags & SEC_READONLY) != 0) |
||||||
|
+ return TRUE; |
||||||
|
+ } |
||||||
|
+ |
||||||
|
+ return FALSE; |
||||||
|
+} |
||||||
|
+ |
||||||
|
/* Adjust a symbol defined by a dynamic object and referenced by a |
||||||
|
regular object. The current definition is in some section of the |
||||||
|
dynamic object, but we're not including those sections. We have to |
||||||
|
@@ -6942,6 +6987,19 @@ elfNN_aarch64_adjust_dynamic_symbol (struct bfd_link_info *info, |
||||||
|
return TRUE; |
||||||
|
} |
||||||
|
|
||||||
|
+ if (ELIMINATE_COPY_RELOCS) |
||||||
|
+ { |
||||||
|
+ struct elf_aarch64_link_hash_entry *eh; |
||||||
|
+ /* If we didn't find any dynamic relocs in read-only sections, then |
||||||
|
+ we'll be keeping the dynamic relocs and avoiding the copy reloc. */ |
||||||
|
+ eh = (struct elf_aarch64_link_hash_entry *) h; |
||||||
|
+ if (!need_copy_relocation_p (eh)) |
||||||
|
+ { |
||||||
|
+ h->non_got_ref = 0; |
||||||
|
+ return TRUE; |
||||||
|
+ } |
||||||
|
+ } |
||||||
|
+ |
||||||
|
/* We must allocate the symbol in our .dynbss section, which will |
||||||
|
become part of the .bss section of the executable. There will be |
||||||
|
an entry for this symbol in the .dynsym section. The dynamic |
||||||
|
diff --git a/ld/testsuite/ld-aarch64/copy-reloc-2.d b/ld/testsuite/ld-aarch64/copy-reloc-2.d |
||||||
|
new file mode 100644 (file) |
||||||
|
index 0000000..87ddccd |
||||||
|
--- /dev/null |
||||||
|
+++ b/ld/testsuite/ld-aarch64/copy-reloc-2.d |
||||||
|
@@ -0,0 +1,7 @@ |
||||||
|
+.* |
||||||
|
+DYNAMIC RELOCATION RECORDS |
||||||
|
+OFFSET.*TYPE.*VALUE.* |
||||||
|
+.*R_AARCH64_COPY.*global_[abcd] |
||||||
|
+.*R_AARCH64_COPY.*global_[abcd] |
||||||
|
+.*R_AARCH64_COPY.*global_[abcd] |
||||||
|
+.*R_AARCH64_COPY.*global_[abcd] |
||||||
|
diff --git a/ld/testsuite/ld-aarch64/copy-reloc-eliminate.d b/ld/testsuite/ld-aarch64/copy-reloc-eliminate.d |
||||||
|
new file mode 100644 (file) |
||||||
|
index 0000000..9657d65 |
||||||
|
--- /dev/null |
||||||
|
+++ b/ld/testsuite/ld-aarch64/copy-reloc-eliminate.d |
||||||
|
@@ -0,0 +1,4 @@ |
||||||
|
+.* |
||||||
|
+DYNAMIC RELOCATION RECORDS |
||||||
|
+OFFSET.*TYPE.*VALUE.* |
||||||
|
+.*R_AARCH64_ABS64.*global_a |
||||||
|
diff --git a/ld/testsuite/ld-aarch64/copy-reloc-exe-2.s b/ld/testsuite/ld-aarch64/copy-reloc-exe-2.s |
||||||
|
new file mode 100644 (file) |
||||||
|
index 0000000..d83658c |
||||||
|
--- /dev/null |
||||||
|
+++ b/ld/testsuite/ld-aarch64/copy-reloc-exe-2.s |
||||||
|
@@ -0,0 +1,32 @@ |
||||||
|
+ # expect copy relocation for all these scenarios. |
||||||
|
+ .global p |
||||||
|
+ .global q |
||||||
|
+ .global r |
||||||
|
+ .section .data.rel.ro,"aw",%progbits |
||||||
|
+ .align 3 |
||||||
|
+ .type p, %object |
||||||
|
+ .size p, 8 |
||||||
|
+p: |
||||||
|
+ .xword global_a |
||||||
|
+ |
||||||
|
+ .type q, %object |
||||||
|
+ .size q, 8 |
||||||
|
+q: |
||||||
|
+ .xword global_b |
||||||
|
+ |
||||||
|
+ .type r, %object |
||||||
|
+ .size r, 8 |
||||||
|
+r: |
||||||
|
+ # Any pc-rel relocation as no dynamic linker support on AArch64. |
||||||
|
+ .xword global_c - . |
||||||
|
+ |
||||||
|
+ .text |
||||||
|
+ .global main |
||||||
|
+main: |
||||||
|
+ # Symbols are referenced by any other relocation against read-only |
||||||
|
+ # section. |
||||||
|
+ movz x0, :abs_g0_nc:global_a |
||||||
|
+ adrp x1, global_b |
||||||
|
+ # pc-rel. |
||||||
|
+ adrp x2, global_d |
||||||
|
+ add x2, x2, #:lo12:global_c |
||||||
|
diff --git a/ld/testsuite/ld-aarch64/copy-reloc-exe-eliminate.s b/ld/testsuite/ld-aarch64/copy-reloc-exe-eliminate.s |
||||||
|
new file mode 100644 (file) |
||||||
|
index 0000000..33227aa |
||||||
|
--- /dev/null |
||||||
|
+++ b/ld/testsuite/ld-aarch64/copy-reloc-exe-eliminate.s |
||||||
|
@@ -0,0 +1,7 @@ |
||||||
|
+ .global p |
||||||
|
+ .section .data.rel.ro,"aw",%progbits |
||||||
|
+ .align 3 |
||||||
|
+ .type p, %object |
||||||
|
+ .size p, 8 |
||||||
|
+p: |
||||||
|
+ .xword global_a |
||||||
|
--- binutils.orig/ld/testsuite/ld-aarch64/copy-reloc-so.s 2017-10-10 16:56:06.347550451 +0100 |
||||||
|
+++ binutils-2.27/ld/testsuite/ld-aarch64/copy-reloc-so.s 2017-10-10 16:56:25.926321182 +0100 |
||||||
|
@@ -1,6 +1,25 @@ |
||||||
|
.global global_a |
||||||
|
.type global_a, %object |
||||||
|
.size global_a, 4 |
||||||
|
+ |
||||||
|
+ .global global_b |
||||||
|
+ .type global_b, %object |
||||||
|
+ .size global_b, 4 |
||||||
|
+ |
||||||
|
+ .global global_c |
||||||
|
+ .type global_c, %object |
||||||
|
+ .size global_c, 4 |
||||||
|
+ |
||||||
|
+ .global global_d |
||||||
|
+ .type global_d, %object |
||||||
|
+ .size global_d, 4 |
||||||
|
+ |
||||||
|
.data |
||||||
|
global_a: |
||||||
|
.word 0xcafedead |
||||||
|
+global_b: |
||||||
|
+ .word 0xcafecafe |
||||||
|
+global_c: |
||||||
|
+ .word 0xdeadcafe |
||||||
|
+global_d: |
||||||
|
+ .word 0xdeaddead |
||||||
|
--- binutils.orig/ld/testsuite/ld-aarch64/aarch64-elf.exp 2017-10-10 16:56:06.347550451 +0100 |
||||||
|
+++ binutils-2.27/ld/testsuite/ld-aarch64/aarch64-elf.exp 2017-10-10 16:58:19.629989701 +0100 |
||||||
|
@@ -292,6 +292,10 @@ set aarch64elflinktests { |
||||||
|
{} "copy-reloc-so.so"} |
||||||
|
{"ld-aarch64/exe with copy relocation" "-e0 tmpdir/copy-reloc-so.so" "" "" |
||||||
|
{copy-reloc-exe.s} {{objdump -R copy-reloc.d}} "copy-reloc"} |
||||||
|
+ {"ld-aarch64/exe with copy relocation 2" "-e0 tmpdir/copy-reloc-so.so" "" "" |
||||||
|
+ {copy-reloc-exe-2.s} {{objdump -R copy-reloc-2.d}} "copy-reloc-2"} |
||||||
|
+ {"ld-aarch64/exe with copy relocation elimination" "-e0 tmpdir/copy-reloc-so.so" "" "" |
||||||
|
+ {copy-reloc-exe-eliminate.s} {{objdump -R copy-reloc-eliminate.d}} "copy-reloc-elimination"} |
||||||
|
} |
||||||
|
|
||||||
|
run_ld_link_tests $aarch64elflinktests |
||||||
|
--- binutils.orig/bfd/elfnn-aarch64.c 2017-10-10 16:56:05.783557056 +0100 |
||||||
|
+++ binutils-2.27/bfd/elfnn-aarch64.c 2017-10-10 17:15:02.559298576 +0100 |
||||||
|
@@ -246,7 +246,7 @@ |
||||||
|
|| (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC \ |
||||||
|
|| (R_TYPE) == BFD_RELOC_AARCH64_TLSDESC_OFF_G1) |
||||||
|
|
||||||
|
-#define ELIMINATE_COPY_RELOCS 0 |
||||||
|
+#define ELIMINATE_COPY_RELOCS 1 |
||||||
|
|
||||||
|
/* Return size of a relocation entry. HTAB is the bfd's |
||||||
|
elf_aarch64_link_hash_entry. */ |
||||||
|
@@ -5154,12 +5154,25 @@ elfNN_aarch64_final_link_relocate (reloc |
||||||
|
/* When generating a shared object or relocatable executable, these |
||||||
|
relocations are copied into the output file to be resolved at |
||||||
|
run time. */ |
||||||
|
- if (((bfd_link_pic (info) == TRUE) |
||||||
|
- || globals->root.is_relocatable_executable) |
||||||
|
- && (input_section->flags & SEC_ALLOC) |
||||||
|
- && (h == NULL |
||||||
|
- || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT |
||||||
|
- || h->root.type != bfd_link_hash_undefweak)) |
||||||
|
+ if ((((bfd_link_pic (info) == TRUE) |
||||||
|
+ || globals->root.is_relocatable_executable) |
||||||
|
+ && (input_section->flags & SEC_ALLOC) |
||||||
|
+ && (h == NULL |
||||||
|
+ || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT |
||||||
|
+ || h->root.type != bfd_link_hash_undefweak)) |
||||||
|
+ /* Or we are creating an executable, we may need to keep relocations |
||||||
|
+ for symbols satisfied by a dynamic library if we manage to avoid |
||||||
|
+ copy relocs for the symbol. */ |
||||||
|
+ || (ELIMINATE_COPY_RELOCS |
||||||
|
+ && !bfd_link_pic (info) |
||||||
|
+ && h != NULL |
||||||
|
+ && (input_section->flags & SEC_ALLOC) |
||||||
|
+ && h->dynindx != -1 |
||||||
|
+ && !h->non_got_ref |
||||||
|
+ && ((h->def_dynamic |
||||||
|
+ && !h->def_regular) |
||||||
|
+ || h->root.type == bfd_link_hash_undefweak |
||||||
|
+ || h->root.type == bfd_link_hash_undefined))) |
||||||
|
{ |
||||||
|
Elf_Internal_Rela outrel; |
||||||
|
bfd_byte *loc; |
||||||
|
@@ -6777,15 +6790,22 @@ elfNN_aarch64_gc_sweep_hook (bfd *abfd, |
||||||
|
h->plt.refcount -= 1; |
||||||
|
break; |
||||||
|
|
||||||
|
+ case BFD_RELOC_AARCH64_ADD_LO12: |
||||||
|
case BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL: |
||||||
|
case BFD_RELOC_AARCH64_ADR_HI21_PCREL: |
||||||
|
case BFD_RELOC_AARCH64_ADR_LO21_PCREL: |
||||||
|
+ case BFD_RELOC_AARCH64_LDST128_LO12: |
||||||
|
+ case BFD_RELOC_AARCH64_LDST16_LO12: |
||||||
|
+ case BFD_RELOC_AARCH64_LDST32_LO12: |
||||||
|
+ case BFD_RELOC_AARCH64_LDST64_LO12: |
||||||
|
+ case BFD_RELOC_AARCH64_LDST8_LO12: |
||||||
|
+ case BFD_RELOC_AARCH64_LD_LO19_PCREL: |
||||||
|
case BFD_RELOC_AARCH64_MOVW_G0_NC: |
||||||
|
case BFD_RELOC_AARCH64_MOVW_G1_NC: |
||||||
|
case BFD_RELOC_AARCH64_MOVW_G2_NC: |
||||||
|
case BFD_RELOC_AARCH64_MOVW_G3: |
||||||
|
case BFD_RELOC_AARCH64_NN: |
||||||
|
- if (h != NULL && bfd_link_executable (info)) |
||||||
|
+ if (h != NULL && bfd_link_pic (info)) |
||||||
|
{ |
||||||
|
if (h->plt.refcount > 0) |
||||||
|
h->plt.refcount -= 1; |
||||||
|
@@ -7158,6 +7178,41 @@ elfNN_aarch64_check_relocs (bfd *abfd, s |
||||||
|
|
||||||
|
switch (bfd_r_type) |
||||||
|
{ |
||||||
|
+ case BFD_RELOC_AARCH64_MOVW_G0_NC: |
||||||
|
+ case BFD_RELOC_AARCH64_MOVW_G1_NC: |
||||||
|
+ case BFD_RELOC_AARCH64_MOVW_G2_NC: |
||||||
|
+ case BFD_RELOC_AARCH64_MOVW_G3: |
||||||
|
+ if (bfd_link_pic (info)) |
||||||
|
+ { |
||||||
|
+ int howto_index = bfd_r_type - BFD_RELOC_AARCH64_RELOC_START; |
||||||
|
+ _bfd_error_handler |
||||||
|
+ /* xgettext:c-format */ |
||||||
|
+ (_("%B: relocation %s against `%s' can not be used when making " |
||||||
|
+ "a shared object; recompile with -fPIC"), |
||||||
|
+ abfd, elfNN_aarch64_howto_table[howto_index].name, |
||||||
|
+ (h) ? h->root.root.string : "a local symbol"); |
||||||
|
+ bfd_set_error (bfd_error_bad_value); |
||||||
|
+ return FALSE; |
||||||
|
+ } |
||||||
|
+ /* Fall through. */ |
||||||
|
+ |
||||||
|
+ case BFD_RELOC_AARCH64_16_PCREL: |
||||||
|
+ case BFD_RELOC_AARCH64_32_PCREL: |
||||||
|
+ case BFD_RELOC_AARCH64_64_PCREL: |
||||||
|
+ case BFD_RELOC_AARCH64_ADD_LO12: |
||||||
|
+ case BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL: |
||||||
|
+ case BFD_RELOC_AARCH64_ADR_HI21_PCREL: |
||||||
|
+ case BFD_RELOC_AARCH64_ADR_LO21_PCREL: |
||||||
|
+ case BFD_RELOC_AARCH64_LDST128_LO12: |
||||||
|
+ case BFD_RELOC_AARCH64_LDST16_LO12: |
||||||
|
+ case BFD_RELOC_AARCH64_LDST32_LO12: |
||||||
|
+ case BFD_RELOC_AARCH64_LDST64_LO12: |
||||||
|
+ case BFD_RELOC_AARCH64_LDST8_LO12: |
||||||
|
+ case BFD_RELOC_AARCH64_LD_LO19_PCREL: |
||||||
|
+ if (h == NULL || bfd_link_pic (info)) |
||||||
|
+ break; |
||||||
|
+ /* Fall through. */ |
||||||
|
+ |
||||||
|
case BFD_RELOC_AARCH64_NN: |
||||||
|
|
||||||
|
/* We don't need to handle relocs into sections not going into |
||||||
|
@@ -7176,12 +7231,32 @@ elfNN_aarch64_check_relocs (bfd *abfd, s |
||||||
|
|
||||||
|
/* No need to do anything if we're not creating a shared |
||||||
|
object. */ |
||||||
|
- if (! bfd_link_pic (info)) |
||||||
|
- break; |
||||||
|
+ if (!(bfd_link_pic (info) |
||||||
|
+ /* If on the other hand, we are creating an executable, we |
||||||
|
+ may need to keep relocations for symbols satisfied by a |
||||||
|
+ dynamic library if we manage to avoid copy relocs for the |
||||||
|
+ symbol. |
||||||
|
+ |
||||||
|
+ NOTE: Currently, there is no support of copy relocs |
||||||
|
+ elimination on pc-relative relocation types, because there is |
||||||
|
+ no dynamic relocation support for them in glibc. We still |
||||||
|
+ record the dynamic symbol reference for them. This is |
||||||
|
+ because one symbol may be referenced by both absolute |
||||||
|
+ relocation (for example, BFD_RELOC_AARCH64_NN) and |
||||||
|
+ pc-relative relocation. We need full symbol reference |
||||||
|
+ information to make correct decision later in |
||||||
|
+ elfNN_aarch64_adjust_dynamic_symbol. */ |
||||||
|
+ || (ELIMINATE_COPY_RELOCS |
||||||
|
+ && !bfd_link_pic (info) |
||||||
|
+ && h != NULL |
||||||
|
+ && (h->root.type == bfd_link_hash_defweak |
||||||
|
+ || !h->def_regular)))) |
||||||
|
+ break; |
||||||
|
|
||||||
|
{ |
||||||
|
struct elf_dyn_relocs *p; |
||||||
|
struct elf_dyn_relocs **head; |
||||||
|
+ int howto_index = bfd_r_type - BFD_RELOC_AARCH64_RELOC_START; |
||||||
|
|
||||||
|
/* We must copy these reloc types into the output file. |
||||||
|
Create a reloc section in dynobj and make room for |
||||||
|
@@ -7245,6 +7320,8 @@ elfNN_aarch64_check_relocs (bfd *abfd, s |
||||||
|
|
||||||
|
p->count += 1; |
||||||
|
|
||||||
|
+ if (elfNN_aarch64_howto_table[howto_index].pc_relative) |
||||||
|
+ p->pc_count += 1; |
||||||
|
} |
||||||
|
break; |
||||||
|
|
||||||
|
@@ -7348,42 +7425,6 @@ elfNN_aarch64_check_relocs (bfd *abfd, s |
||||||
|
break; |
||||||
|
} |
||||||
|
|
||||||
|
- case BFD_RELOC_AARCH64_MOVW_G0_NC: |
||||||
|
- case BFD_RELOC_AARCH64_MOVW_G1_NC: |
||||||
|
- case BFD_RELOC_AARCH64_MOVW_G2_NC: |
||||||
|
- case BFD_RELOC_AARCH64_MOVW_G3: |
||||||
|
- if (bfd_link_pic (info)) |
||||||
|
- { |
||||||
|
- int howto_index = bfd_r_type - BFD_RELOC_AARCH64_RELOC_START; |
||||||
|
- (*_bfd_error_handler) |
||||||
|
- (_("%B: relocation %s against `%s' can not be used when making " |
||||||
|
- "a shared object; recompile with -fPIC"), |
||||||
|
- abfd, elfNN_aarch64_howto_table[howto_index].name, |
||||||
|
- (h) ? h->root.root.string : "a local symbol"); |
||||||
|
- bfd_set_error (bfd_error_bad_value); |
||||||
|
- return FALSE; |
||||||
|
- } |
||||||
|
- |
||||||
|
- case BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL: |
||||||
|
- case BFD_RELOC_AARCH64_ADR_HI21_PCREL: |
||||||
|
- case BFD_RELOC_AARCH64_ADR_LO21_PCREL: |
||||||
|
- if (h != NULL && bfd_link_executable (info)) |
||||||
|
- { |
||||||
|
- /* If this reloc is in a read-only section, we might |
||||||
|
- need a copy reloc. We can't check reliably at this |
||||||
|
- stage whether the section is read-only, as input |
||||||
|
- sections have not yet been mapped to output sections. |
||||||
|
- Tentatively set the flag for now, and correct in |
||||||
|
- adjust_dynamic_symbol. */ |
||||||
|
- h->non_got_ref = 1; |
||||||
|
- h->plt.refcount += 1; |
||||||
|
- h->pointer_equality_needed = 1; |
||||||
|
- } |
||||||
|
- /* FIXME:: RR need to handle these in shared libraries |
||||||
|
- and essentially bomb out as these being non-PIC |
||||||
|
- relocations in shared libraries. */ |
||||||
|
- break; |
||||||
|
- |
||||||
|
case BFD_RELOC_AARCH64_CALL26: |
||||||
|
case BFD_RELOC_AARCH64_JUMP26: |
||||||
|
/* If this is a local symbol then we resolve it |
@ -0,0 +1,25 @@ |
|||||||
|
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; |
||||||
|
Only in binutils.orig/ld/testsuite/ld-ifunc: .#pr18808b.c |
||||||
|
Only in binutils.orig/ld/testsuite/ld-ifunc: #pr18808b.c# |
||||||
|
diff -rup binutils.orig/ld/testsuite/ld-ifunc/pr18808b.c binutils-2.27/ld/testsuite/ld-ifunc/pr18808b.c |
||||||
|
--- binutils.orig/ld/testsuite/ld-ifunc/pr18808b.c 2017-02-21 10:45:27.418826491 +0000 |
||||||
|
+++ binutils-2.27/ld/testsuite/ld-ifunc/pr18808b.c 2017-02-21 10:45:41.049608726 +0000 |
||||||
|
@@ -6,7 +6,7 @@ static int foo_impl(int x) |
||||||
|
return x; |
||||||
|
} |
||||||
|
|
||||||
|
-int bar() |
||||||
|
+void bar () |
||||||
|
{ |
||||||
|
int (*f)(int) = foo; |
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,84 @@ |
|||||||
|
--- binutils-2.27.orig/binutils/readelf.c 2017-01-16 11:51:05.043922264 +0000 |
||||||
|
+++ binutils-2.27/binutils/readelf.c 2017-01-16 12:01:34.389053872 +0000 |
||||||
|
@@ -16733,39 +16733,49 @@ process_archive (char * file_name, FILE |
||||||
|
static int |
||||||
|
process_file (char * file_name) |
||||||
|
{ |
||||||
|
+ char * name; |
||||||
|
+ char * saved_program_name; |
||||||
|
FILE * file; |
||||||
|
struct stat statbuf; |
||||||
|
char armag[SARMAG]; |
||||||
|
- int ret; |
||||||
|
+ int ret = 1; |
||||||
|
+ |
||||||
|
+ /* 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 1; |
||||||
|
+ 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 1; |
||||||
|
+ error (_("Not an ordinary file\n")); |
||||||
|
+ goto done; |
||||||
|
} |
||||||
|
|
||||||
|
file = fopen (file_name, "rb"); |
||||||
|
if (file == NULL) |
||||||
|
{ |
||||||
|
- error (_("Input file '%s' is not readable.\n"), file_name); |
||||||
|
- return 1; |
||||||
|
+ error (_("Not readable\n")); |
||||||
|
+ goto done; |
||||||
|
} |
||||||
|
|
||||||
|
if (fread (armag, SARMAG, 1, file) != 1) |
||||||
|
{ |
||||||
|
- error (_("%s: Failed to read file's magic number\n"), file_name); |
||||||
|
+ error (_("Failed to read file's magic number\n")); |
||||||
|
fclose (file); |
||||||
|
- return 1; |
||||||
|
+ goto done; |
||||||
|
} |
||||||
|
|
||||||
|
current_file_size = (bfd_size_type) statbuf.st_size; |
||||||
|
@@ -16777,8 +16787,7 @@ process_file (char * file_name) |
||||||
|
else |
||||||
|
{ |
||||||
|
if (do_archive_index) |
||||||
|
- error (_("File %s is not an archive so its index cannot be displayed.\n"), |
||||||
|
- file_name); |
||||||
|
+ error (_("Not an archive so its index cannot be displayed\n")); |
||||||
|
|
||||||
|
rewind (file); |
||||||
|
archive_file_size = archive_file_offset = 0; |
||||||
|
@@ -16787,7 +16796,10 @@ process_file (char * file_name) |
||||||
|
|
||||||
|
fclose (file); |
||||||
|
|
||||||
|
+ done: |
||||||
|
current_file_size = 0; |
||||||
|
+ free (program_name); |
||||||
|
+ program_name = saved_program_name; |
||||||
|
return ret; |
||||||
|
} |
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,271 @@ |
|||||||
|
diff -rup binutils-2.27.orig/bfd/ChangeLog binutils-2.27/bfd/ChangeLog |
||||||
|
--- binutils-2.27.orig/bfd/ChangeLog 2016-08-12 17:14:07.621773233 +0100 |
||||||
|
+++ binutils-2.27/bfd/ChangeLog 2016-08-12 17:17:32.408119156 +0100 |
||||||
|
@@ -1,3 +1,9 @@ |
||||||
|
+2016-08-12 Alan Modra <amodra@gmail.com> |
||||||
|
+ |
||||||
|
+ * elf-bfd.h (struct elf_link_hash_table): Add local_dynsymcount. |
||||||
|
+ * elflink.c (_bfd_elf_link_renumber_dynsyms): Set local_dynsymcount. |
||||||
|
+ (bfd_elf_final_link): Set .dynsym sh_info from local_dynsymcount. |
||||||
|
+ |
||||||
|
2016-08-03 Tristan Gingold <gingold@adacore.com> |
||||||
|
|
||||||
|
* version.m4: Bump version to 2.27 |
||||||
|
Only in binutils-2.27/bfd: ChangeLog.orig |
||||||
|
Only in binutils-2.27/bfd: ChangeLog.rej |
||||||
|
diff -rup binutils-2.27.orig/bfd/elf-bfd.h binutils-2.27/bfd/elf-bfd.h |
||||||
|
--- binutils-2.27.orig/bfd/elf-bfd.h 2016-08-12 17:14:07.630773290 +0100 |
||||||
|
+++ binutils-2.27/bfd/elf-bfd.h 2016-08-12 17:16:08.519549845 +0100 |
||||||
|
@@ -524,6 +524,7 @@ struct elf_link_hash_table |
||||||
|
/* The number of symbols found in the link which is intended for the |
||||||
|
mandatory DT_SYMTAB tag (.dynsym section) in .dynamic section. */ |
||||||
|
bfd_size_type dynsymcount; |
||||||
|
+ bfd_size_type local_dynsymcount; |
||||||
|
|
||||||
|
/* The string table of dynamic symbols, which becomes the .dynstr |
||||||
|
section. */ |
||||||
|
diff -rup binutils-2.27.orig/bfd/elflink.c binutils-2.27/bfd/elflink.c |
||||||
|
--- binutils-2.27.orig/bfd/elflink.c 2016-08-12 17:14:07.637773334 +0100 |
||||||
|
+++ binutils-2.27/bfd/elflink.c 2016-08-12 17:16:08.521549858 +0100 |
||||||
|
@@ -903,6 +903,7 @@ _bfd_elf_link_renumber_dynsyms (bfd *out |
||||||
|
for (p = elf_hash_table (info)->dynlocal; p ; p = p->next) |
||||||
|
p->dynindx = ++dynsymcount; |
||||||
|
} |
||||||
|
+ elf_hash_table (info)->local_dynsymcount = dynsymcount; |
||||||
|
|
||||||
|
elf_link_hash_traverse (elf_hash_table (info), |
||||||
|
elf_link_renumber_hash_table_dynsyms, |
||||||
|
@@ -11678,7 +11679,10 @@ bfd_elf_final_link (bfd *abfd, struct bf |
||||||
|
{ |
||||||
|
Elf_Internal_Sym sym; |
||||||
|
bfd_byte *dynsym = elf_hash_table (info)->dynsym->contents; |
||||||
|
- long last_local = 0; |
||||||
|
+ |
||||||
|
+ o = elf_hash_table (info)->dynsym->output_section; |
||||||
|
+ elf_section_data (o)->this_hdr.sh_info |
||||||
|
+ = elf_hash_table (info)->local_dynsymcount + 1; |
||||||
|
|
||||||
|
/* Write out the section symbols for the output sections. */ |
||||||
|
if (bfd_link_pic (info) |
||||||
|
@@ -11708,8 +11712,6 @@ bfd_elf_final_link (bfd *abfd, struct bf |
||||||
|
return FALSE; |
||||||
|
sym.st_value = s->vma; |
||||||
|
dest = dynsym + dynindx * bed->s->sizeof_sym; |
||||||
|
- if (last_local < dynindx) |
||||||
|
- last_local = dynindx; |
||||||
|
bed->s->swap_symbol_out (abfd, &sym, dest, 0); |
||||||
|
} |
||||||
|
} |
||||||
|
@@ -11742,16 +11744,10 @@ bfd_elf_final_link (bfd *abfd, struct bf |
||||||
|
+ e->isym.st_value); |
||||||
|
} |
||||||
|
|
||||||
|
- if (last_local < e->dynindx) |
||||||
|
- last_local = e->dynindx; |
||||||
|
- |
||||||
|
dest = dynsym + e->dynindx * bed->s->sizeof_sym; |
||||||
|
bed->s->swap_symbol_out (abfd, &sym, dest, 0); |
||||||
|
} |
||||||
|
} |
||||||
|
- |
||||||
|
- elf_section_data (elf_hash_table (info)->dynsym->output_section)->this_hdr.sh_info = |
||||||
|
- last_local + 1; |
||||||
|
} |
||||||
|
|
||||||
|
/* We get the global symbols from the hash table. */ |
||||||
|
Only in binutils-2.27/bfd: elflink.c.orig |
||||||
|
diff -rup binutils-2.27.orig/ld/ChangeLog binutils-2.27/ld/ChangeLog |
||||||
|
--- binutils-2.27.orig/ld/ChangeLog 2016-08-12 17:14:08.064776041 +0100 |
||||||
|
+++ binutils-2.27/ld/ChangeLog 2016-08-12 17:17:00.166900351 +0100 |
||||||
|
@@ -1,3 +1,19 @@ |
||||||
|
+2016-08-12 Alan Modra <amodra@gmail.com> |
||||||
|
+ |
||||||
|
+ * testsuite/ld-tic6x/shlib-1.rd: Correct expected .dynsym sh_info. |
||||||
|
+ * testsuite/ld-tic6x/shlib-1b.rd: Likewise. |
||||||
|
+ * testsuite/ld-tic6x/shlib-1r.rd: Likewise. |
||||||
|
+ * testsuite/ld-tic6x/shlib-1rb.rd: Likewise. |
||||||
|
+ * testsuite/ld-tic6x/shlib-app-1.rd: Likewise. |
||||||
|
+ * testsuite/ld-tic6x/shlib-app-1b.rd: Likewise. |
||||||
|
+ * testsuite/ld-tic6x/shlib-app-1r.rd: Likewise. |
||||||
|
+ * testsuite/ld-tic6x/shlib-app-1rb.rd: Likewise. |
||||||
|
+ * testsuite/ld-tic6x/shlib-noindex.rd: Likewise. |
||||||
|
+ * testsuite/ld-tic6x/static-app-1.rd: Likewise. |
||||||
|
+ * testsuite/ld-tic6x/static-app-1b.rd: Likewise. |
||||||
|
+ * testsuite/ld-tic6x/static-app-1r.rd: Likewise. |
||||||
|
+ * testsuite/ld-tic6x/static-app-1rb.rd: Likewise. |
||||||
|
+ |
||||||
|
2016-08-03 Tristan Gingold <gingold@adacore.com> |
||||||
|
|
||||||
|
* configure: Regenerate. |
||||||
|
Only in binutils-2.27/ld: ChangeLog.orig |
||||||
|
Only in binutils-2.27/ld: ChangeLog.rej |
||||||
|
diff -rup binutils-2.27.orig/ld/testsuite/ld-tic6x/shlib-1b.rd binutils-2.27/ld/testsuite/ld-tic6x/shlib-1b.rd |
||||||
|
--- binutils-2.27.orig/ld/testsuite/ld-tic6x/shlib-1b.rd 2016-08-12 17:14:08.200776903 +0100 |
||||||
|
+++ binutils-2.27/ld/testsuite/ld-tic6x/shlib-1b.rd 2016-08-12 17:16:08.522549865 +0100 |
||||||
|
@@ -4,7 +4,7 @@ Section Headers: |
||||||
|
\[Nr\] Name Type Addr Off Size ES Flg Lk Inf Al |
||||||
|
\[ 0\] NULL 00000000 000000 000000 00 0 0 0 |
||||||
|
\[ 1\] \.hash HASH 00008000 001000 000048 04 A 2 0 4 |
||||||
|
- \[ 2\] \.dynsym DYNSYM 00008048 001048 0000d0 10 A 3 6 4 |
||||||
|
+ \[ 2\] \.dynsym DYNSYM 00008048 001048 0000d0 10 A 3 7 4 |
||||||
|
\[ 3\] \.dynstr STRTAB 00008118 001118 000025 00 A 0 0 1 |
||||||
|
\[ 4\] \.rela\.got RELA 00008140 001140 000024 0c AI 2 10 4 |
||||||
|
\[ 5\] \.rela\.neardata RELA 00008164 001164 000018 0c AI 2 11 4 |
||||||
|
diff -rup binutils-2.27.orig/ld/testsuite/ld-tic6x/shlib-1rb.rd binutils-2.27/ld/testsuite/ld-tic6x/shlib-1rb.rd |
||||||
|
--- binutils-2.27.orig/ld/testsuite/ld-tic6x/shlib-1rb.rd 2016-08-12 17:14:08.200776903 +0100 |
||||||
|
+++ binutils-2.27/ld/testsuite/ld-tic6x/shlib-1rb.rd 2016-08-12 17:16:08.522549865 +0100 |
||||||
|
@@ -4,7 +4,7 @@ Section Headers: |
||||||
|
\[Nr\] Name Type Addr Off Size ES Flg Lk Inf Al |
||||||
|
\[ 0\] NULL 00000000 000000 000000 00 0 0 0 |
||||||
|
\[ 1\] \.hash HASH 00008000 001000 000048 04 A 2 0 4 |
||||||
|
- \[ 2\] \.dynsym DYNSYM 00008048 001048 0000d0 10 A 3 6 4 |
||||||
|
+ \[ 2\] \.dynsym DYNSYM 00008048 001048 0000d0 10 A 3 7 4 |
||||||
|
\[ 3\] \.dynstr STRTAB 00008118 001118 000025 00 A 0 0 1 |
||||||
|
\[ 4\] \.rela\.got RELA 00008140 001140 000024 0c AI 2 10 4 |
||||||
|
\[ 5\] \.rela\.neardata RELA 00008164 001164 000018 0c AI 2 11 4 |
||||||
|
diff -rup binutils-2.27.orig/ld/testsuite/ld-tic6x/shlib-1.rd binutils-2.27/ld/testsuite/ld-tic6x/shlib-1.rd |
||||||
|
--- binutils-2.27.orig/ld/testsuite/ld-tic6x/shlib-1.rd 2016-08-12 17:14:08.200776903 +0100 |
||||||
|
+++ binutils-2.27/ld/testsuite/ld-tic6x/shlib-1.rd 2016-08-12 17:16:08.522549865 +0100 |
||||||
|
@@ -4,7 +4,7 @@ Section Headers: |
||||||
|
\[Nr\] Name Type Addr Off Size ES Flg Lk Inf Al |
||||||
|
\[ 0\] NULL 00000000 000000 000000 00 0 0 0 |
||||||
|
\[ 1\] \.hash HASH 00008000 001000 000048 04 A 2 0 4 |
||||||
|
- \[ 2\] \.dynsym DYNSYM 00008048 001048 0000d0 10 A 3 6 4 |
||||||
|
+ \[ 2\] \.dynsym DYNSYM 00008048 001048 0000d0 10 A 3 7 4 |
||||||
|
\[ 3\] \.dynstr STRTAB 00008118 001118 000025 00 A 0 0 1 |
||||||
|
\[ 4\] \.rela\.got RELA 00008140 001140 000024 0c AI 2 10 4 |
||||||
|
\[ 5\] \.rela\.neardata RELA 00008164 001164 000018 0c AI 2 11 4 |
||||||
|
diff -rup binutils-2.27.orig/ld/testsuite/ld-tic6x/shlib-1r.rd binutils-2.27/ld/testsuite/ld-tic6x/shlib-1r.rd |
||||||
|
--- binutils-2.27.orig/ld/testsuite/ld-tic6x/shlib-1r.rd 2016-08-12 17:14:08.200776903 +0100 |
||||||
|
+++ binutils-2.27/ld/testsuite/ld-tic6x/shlib-1r.rd 2016-08-12 17:16:08.522549865 +0100 |
||||||
|
@@ -4,7 +4,7 @@ Section Headers: |
||||||
|
\[Nr\] Name Type Addr Off Size ES Flg Lk Inf Al |
||||||
|
\[ 0\] NULL 00000000 000000 000000 00 0 0 0 |
||||||
|
\[ 1\] \.hash HASH 00008000 001000 000048 04 A 2 0 4 |
||||||
|
- \[ 2\] \.dynsym DYNSYM 00008048 001048 0000d0 10 A 3 6 4 |
||||||
|
+ \[ 2\] \.dynsym DYNSYM 00008048 001048 0000d0 10 A 3 7 4 |
||||||
|
\[ 3\] \.dynstr STRTAB 00008118 001118 000025 00 A 0 0 1 |
||||||
|
\[ 4\] \.rela\.got RELA 00008140 001140 000024 0c AI 2 10 4 |
||||||
|
\[ 5\] \.rela\.neardata RELA 00008164 001164 000018 0c AI 2 11 4 |
||||||
|
diff -rup binutils-2.27.orig/ld/testsuite/ld-tic6x/shlib-app-1b.rd binutils-2.27/ld/testsuite/ld-tic6x/shlib-app-1b.rd |
||||||
|
--- binutils-2.27.orig/ld/testsuite/ld-tic6x/shlib-app-1b.rd 2016-08-12 17:14:08.200776903 +0100 |
||||||
|
+++ binutils-2.27/ld/testsuite/ld-tic6x/shlib-app-1b.rd 2016-08-12 17:16:08.522549865 +0100 |
||||||
|
@@ -4,7 +4,7 @@ Section Headers: |
||||||
|
\[Nr\] Name Type Addr Off Size ES Flg Lk Inf Al |
||||||
|
\[ 0\] NULL 00000000 000000 000000 00 0 0 0 |
||||||
|
\[ 1\] \.hash HASH 00008000 001000 000044 04 A 2 0 4 |
||||||
|
- \[ 2\] \.dynsym DYNSYM 00008044 001044 0000c0 10 A 3 6 4 |
||||||
|
+ \[ 2\] \.dynsym DYNSYM 00008044 001044 0000c0 10 A 3 7 4 |
||||||
|
\[ 3\] \.dynstr STRTAB 00008104 001104 000036 00 A 0 0 1 |
||||||
|
\[ 4\] \.rela\.got RELA 0000813c 00113c 000018 0c AI 2 11 4 |
||||||
|
\[ 5\] \.rela\.neardata RELA 00008154 001154 000018 0c AI 2 12 4 |
||||||
|
diff -rup binutils-2.27.orig/ld/testsuite/ld-tic6x/shlib-app-1rb.rd binutils-2.27/ld/testsuite/ld-tic6x/shlib-app-1rb.rd |
||||||
|
--- binutils-2.27.orig/ld/testsuite/ld-tic6x/shlib-app-1rb.rd 2016-08-12 17:14:08.201776909 +0100 |
||||||
|
+++ binutils-2.27/ld/testsuite/ld-tic6x/shlib-app-1rb.rd 2016-08-12 17:16:08.522549865 +0100 |
||||||
|
@@ -4,7 +4,7 @@ Section Headers: |
||||||
|
\[Nr\] Name Type Addr Off Size ES Flg Lk Inf Al |
||||||
|
\[ 0\] NULL 00000000 000000 000000 00 0 0 0 |
||||||
|
\[ 1\] \.hash HASH 00008000 001000 00003c 04 A 2 0 4 |
||||||
|
- \[ 2\] \.dynsym DYNSYM 0000803c 00103c 0000a0 10 A 3 6 4 |
||||||
|
+ \[ 2\] \.dynsym DYNSYM 0000803c 00103c 0000a0 10 A 3 7 4 |
||||||
|
\[ 3\] \.dynstr STRTAB 000080dc 0010dc 000031 00 A 0 0 1 |
||||||
|
\[ 4\] \.rela\.got RELA 00008110 001110 000018 0c AI 2 10 4 |
||||||
|
\[ 5\] \.rela\.bss RELA 00008128 001128 00000c 0c AI 2 12 4 |
||||||
|
diff -rup binutils-2.27.orig/ld/testsuite/ld-tic6x/shlib-app-1.rd binutils-2.27/ld/testsuite/ld-tic6x/shlib-app-1.rd |
||||||
|
--- binutils-2.27.orig/ld/testsuite/ld-tic6x/shlib-app-1.rd 2016-08-12 17:14:08.200776903 +0100 |
||||||
|
+++ binutils-2.27/ld/testsuite/ld-tic6x/shlib-app-1.rd 2016-08-12 17:16:08.522549865 +0100 |
||||||
|
@@ -4,7 +4,7 @@ Section Headers: |
||||||
|
\[Nr\] Name Type Addr Off Size ES Flg Lk Inf Al |
||||||
|
\[ 0\] NULL 00000000 000000 000000 00 0 0 0 |
||||||
|
\[ 1\] \.hash HASH 00008000 001000 000044 04 A 2 0 4 |
||||||
|
- \[ 2\] \.dynsym DYNSYM 00008044 001044 0000c0 10 A 3 6 4 |
||||||
|
+ \[ 2\] \.dynsym DYNSYM 00008044 001044 0000c0 10 A 3 7 4 |
||||||
|
\[ 3\] \.dynstr STRTAB 00008104 001104 000035 00 A 0 0 1 |
||||||
|
\[ 4\] \.rela\.got RELA 0000813c 00113c 000018 0c AI 2 11 4 |
||||||
|
\[ 5\] \.rela\.neardata RELA 00008154 001154 000018 0c AI 2 12 4 |
||||||
|
diff -rup binutils-2.27.orig/ld/testsuite/ld-tic6x/shlib-app-1r.rd binutils-2.27/ld/testsuite/ld-tic6x/shlib-app-1r.rd |
||||||
|
--- binutils-2.27.orig/ld/testsuite/ld-tic6x/shlib-app-1r.rd 2016-08-12 17:14:08.200776903 +0100 |
||||||
|
+++ binutils-2.27/ld/testsuite/ld-tic6x/shlib-app-1r.rd 2016-08-12 17:16:08.522549865 +0100 |
||||||
|
@@ -4,7 +4,7 @@ Section Headers: |
||||||
|
\[Nr\] Name Type Addr Off Size ES Flg Lk Inf Al |
||||||
|
\[ 0\] NULL 00000000 000000 000000 00 0 0 0 |
||||||
|
\[ 1\] \.hash HASH 00008000 001000 00003c 04 A 2 0 4 |
||||||
|
- \[ 2\] \.dynsym DYNSYM 0000803c 00103c 0000a0 10 A 3 6 4 |
||||||
|
+ \[ 2\] \.dynsym DYNSYM 0000803c 00103c 0000a0 10 A 3 7 4 |
||||||
|
\[ 3\] \.dynstr STRTAB 000080dc 0010dc 000030 00 A 0 0 1 |
||||||
|
\[ 4\] \.rela\.got RELA 0000810c 00110c 000018 0c AI 2 10 4 |
||||||
|
\[ 5\] \.rela\.bss RELA 00008124 001124 00000c 0c AI 2 12 4 |
||||||
|
diff -rup binutils-2.27.orig/ld/testsuite/ld-tic6x/shlib-noindex.rd binutils-2.27/ld/testsuite/ld-tic6x/shlib-noindex.rd |
||||||
|
--- binutils-2.27.orig/ld/testsuite/ld-tic6x/shlib-noindex.rd 2016-08-12 17:14:08.201776909 +0100 |
||||||
|
+++ binutils-2.27/ld/testsuite/ld-tic6x/shlib-noindex.rd 2016-08-12 17:16:08.522549865 +0100 |
||||||
|
@@ -4,7 +4,7 @@ Section Headers: |
||||||
|
\[Nr\] Name Type Addr Off Size ES Flg Lk Inf Al |
||||||
|
\[ 0\] NULL 00000000 000000 000000 00 0 0 0 |
||||||
|
\[ 1\] \.hash HASH 00008000 001000 000048 04 A 2 0 4 |
||||||
|
- \[ 2\] \.dynsym DYNSYM 00008048 001048 0000d0 10 A 3 6 4 |
||||||
|
+ \[ 2\] \.dynsym DYNSYM 00008048 001048 0000d0 10 A 3 7 4 |
||||||
|
\[ 3\] \.dynstr STRTAB 00008118 001118 000025 00 A 0 0 1 |
||||||
|
\[ 4\] \.rela\.text RELA 00008140 001140 00000c 0c AI 2 10 4 |
||||||
|
\[ 5\] \.rela\.got RELA 0000814c 00114c 000024 0c AI 2 11 4 |
||||||
|
diff -rup binutils-2.27.orig/ld/testsuite/ld-tic6x/static-app-1b.rd binutils-2.27/ld/testsuite/ld-tic6x/static-app-1b.rd |
||||||
|
--- binutils-2.27.orig/ld/testsuite/ld-tic6x/static-app-1b.rd 2016-08-12 17:14:08.201776909 +0100 |
||||||
|
+++ binutils-2.27/ld/testsuite/ld-tic6x/static-app-1b.rd 2016-08-12 17:16:08.522549865 +0100 |
||||||
|
@@ -4,7 +4,7 @@ Section Headers: |
||||||
|
\[Nr\] Name Type Addr Off Size ES Flg Lk Inf Al |
||||||
|
\[ 0\] NULL 00000000 000000 000000 00 0 0 0 |
||||||
|
\[ 1\] \.hash HASH 00008000 001000 00003c 04 A 2 0 4 |
||||||
|
- \[ 2\] \.dynsym DYNSYM 0000803c 00103c 0000a0 10 A 3 5 4 |
||||||
|
+ \[ 2\] \.dynsym DYNSYM 0000803c 00103c 0000a0 10 A 3 7 4 |
||||||
|
\[ 3\] \.dynstr STRTAB 000080dc 0010dc 00001d 00 A 0 0 1 |
||||||
|
\[ 4\] \.rela\.got RELA 000080fc 0010fc 000024 0c AI 2 8 4 |
||||||
|
\[ 5\] \.rela\.neardata RELA 00008120 001120 000030 0c AI 2 9 4 |
||||||
|
diff -rup binutils-2.27.orig/ld/testsuite/ld-tic6x/static-app-1rb.rd binutils-2.27/ld/testsuite/ld-tic6x/static-app-1rb.rd |
||||||
|
--- binutils-2.27.orig/ld/testsuite/ld-tic6x/static-app-1rb.rd 2016-08-12 17:14:08.201776909 +0100 |
||||||
|
+++ binutils-2.27/ld/testsuite/ld-tic6x/static-app-1rb.rd 2016-08-12 17:16:08.523549872 +0100 |
||||||
|
@@ -4,7 +4,7 @@ Section Headers: |
||||||
|
\[Nr\] Name Type Addr Off Size ES Flg Lk Inf Al |
||||||
|
\[ 0\] NULL 00000000 000000 000000 00 0 0 0 |
||||||
|
\[ 1\] \.hash HASH 00008000 001000 00003c 04 A 2 0 4 |
||||||
|
- \[ 2\] \.dynsym DYNSYM 0000803c 00103c 0000a0 10 A 3 5 4 |
||||||
|
+ \[ 2\] \.dynsym DYNSYM 0000803c 00103c 0000a0 10 A 3 7 4 |
||||||
|
\[ 3\] \.dynstr STRTAB 000080dc 0010dc 00001d 00 A 0 0 1 |
||||||
|
\[ 4\] \.rela\.got RELA 000080fc 0010fc 000024 0c AI 2 8 4 |
||||||
|
\[ 5\] \.rela\.neardata RELA 00008120 001120 000018 0c AI 2 9 4 |
||||||
|
diff -rup binutils-2.27.orig/ld/testsuite/ld-tic6x/static-app-1.rd binutils-2.27/ld/testsuite/ld-tic6x/static-app-1.rd |
||||||
|
--- binutils-2.27.orig/ld/testsuite/ld-tic6x/static-app-1.rd 2016-08-12 17:14:08.201776909 +0100 |
||||||
|
+++ binutils-2.27/ld/testsuite/ld-tic6x/static-app-1.rd 2016-08-12 17:16:08.522549865 +0100 |
||||||
|
@@ -4,7 +4,7 @@ Section Headers: |
||||||
|
\[Nr\] Name Type Addr Off Size ES Flg Lk Inf Al |
||||||
|
\[ 0\] NULL 00000000 000000 000000 00 0 0 0 |
||||||
|
\[ 1\] \.hash HASH 00008000 001000 00003c 04 A 2 0 4 |
||||||
|
- \[ 2\] \.dynsym DYNSYM 0000803c 00103c 0000a0 10 A 3 5 4 |
||||||
|
+ \[ 2\] \.dynsym DYNSYM 0000803c 00103c 0000a0 10 A 3 7 4 |
||||||
|
\[ 3\] \.dynstr STRTAB 000080dc 0010dc 00001d 00 A 0 0 1 |
||||||
|
\[ 4\] \.rela\.got RELA 000080fc 0010fc 000024 0c AI 2 8 4 |
||||||
|
\[ 5\] \.rela\.neardata RELA 00008120 001120 000030 0c AI 2 9 4 |
||||||
|
diff -rup binutils-2.27.orig/ld/testsuite/ld-tic6x/static-app-1r.rd binutils-2.27/ld/testsuite/ld-tic6x/static-app-1r.rd |
||||||
|
--- binutils-2.27.orig/ld/testsuite/ld-tic6x/static-app-1r.rd 2016-08-12 17:14:08.201776909 +0100 |
||||||
|
+++ binutils-2.27/ld/testsuite/ld-tic6x/static-app-1r.rd 2016-08-12 17:16:08.523549872 +0100 |
||||||
|
@@ -4,7 +4,7 @@ Section Headers: |
||||||
|
\[Nr\] Name Type Addr Off Size ES Flg Lk Inf Al |
||||||
|
\[ 0\] NULL 00000000 000000 000000 00 0 0 0 |
||||||
|
\[ 1\] \.hash HASH 00008000 001000 00003c 04 A 2 0 4 |
||||||
|
- \[ 2\] \.dynsym DYNSYM 0000803c 00103c 0000a0 10 A 3 5 4 |
||||||
|
+ \[ 2\] \.dynsym DYNSYM 0000803c 00103c 0000a0 10 A 3 7 4 |
||||||
|
\[ 3\] \.dynstr STRTAB 000080dc 0010dc 00001d 00 A 0 0 1 |
||||||
|
\[ 4\] \.rela\.got RELA 000080fc 0010fc 000024 0c AI 2 8 4 |
||||||
|
\[ 5\] \.rela\.neardata RELA 00008120 001120 000018 0c AI 2 9 4 |
||||||
|
--- binutils-2.27.orig/binutils/readelf.c 2016-08-12 17:14:07.717773841 +0100 |
||||||
|
+++ binutils-2.27/binutils/readelf.c 2016-08-12 17:24:25.007897415 +0100 |
||||||
|
@@ -11110,6 +11110,11 @@ process_symbol_table (FILE * file) |
||||||
|
} |
||||||
|
|
||||||
|
putchar ('\n'); |
||||||
|
+ |
||||||
|
+ if (ELF_ST_BIND (psym->st_info) == STB_LOCAL |
||||||
|
+ && si >= section->sh_info) |
||||||
|
+ warn (_("local symbol %u found at index >= %s's sh_info value of %u\n"), |
||||||
|
+ si, printable_section_name (section), section->sh_info); |
||||||
|
} |
||||||
|
|
||||||
|
free (symtab); |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,87 @@ |
|||||||
|
diff -rup binutils.orig/gas/testsuite/gas/ppc/power9.d binutils-2.27/gas/testsuite/gas/ppc/power9.d |
||||||
|
--- binutils.orig/gas/testsuite/gas/ppc/power9.d 2017-09-13 09:46:21.695333611 +0100 |
||||||
|
+++ binutils-2.27/gas/testsuite/gas/ppc/power9.d 2017-09-13 09:53:46.594277167 +0100 |
||||||
|
@@ -312,8 +312,9 @@ Disassembly of section \.text: |
||||||
|
.*: (f1 31 9d 6f|6f 9d 31 f1) xscvdphp vs41,vs51 |
||||||
|
.*: (f1 58 a7 6f|6f a7 58 f1) xvcvhpsp vs42,vs52 |
||||||
|
.*: (f1 79 af 6f|6f af 79 f1) xvcvsphp vs43,vs53 |
||||||
|
-.*: (4c 60 00 04|04 00 60 4c) addpcis r3,0 |
||||||
|
-.*: (4c 60 00 04|04 00 60 4c) addpcis r3,0 |
||||||
|
+.*: (4c 60 00 04|04 00 60 4c) lnia r3 |
||||||
|
+.*: (4c 60 00 04|04 00 60 4c) lnia r3 |
||||||
|
+.*: (4c 60 00 04|04 00 60 4c) lnia r3 |
||||||
|
.*: (4c 80 00 05|05 00 80 4c) addpcis r4,1 |
||||||
|
.*: (4c 80 00 05|05 00 80 4c) addpcis r4,1 |
||||||
|
.*: (4c bf ff c4|c4 ff bf 4c) addpcis r5,-2 |
||||||
|
@@ -391,4 +392,7 @@ Disassembly of section \.text: |
||||||
|
.*: (ff d7 04 8e|8e 04 d7 ff) mffscrni f30,0 |
||||||
|
.*: (ff d7 1c 8e|8e 1c d7 ff) mffscrni f30,3 |
||||||
|
.*: (ff f8 04 8e|8e 04 f8 ff) mffsl f31 |
||||||
|
+.*: (01 00 00 44|44 00 00 01) scv 0 |
||||||
|
+.*: (e1 0f 00 44|44 00 0f e1) scv 127 |
||||||
|
+.*: (a4 00 00 4c|4c 00 00 a4) rfscv |
||||||
|
#pass |
||||||
|
diff -rup binutils.orig/gas/testsuite/gas/ppc/power9.s binutils-2.27/gas/testsuite/gas/ppc/power9.s |
||||||
|
--- binutils.orig/gas/testsuite/gas/ppc/power9.s 2017-09-13 09:46:21.694333623 +0100 |
||||||
|
+++ binutils-2.27/gas/testsuite/gas/ppc/power9.s 2017-09-13 09:54:01.747104949 +0100 |
||||||
|
@@ -303,6 +303,7 @@ power9: |
||||||
|
xscvdphp 41,51 |
||||||
|
xvcvhpsp 42,52 |
||||||
|
xvcvsphp 43,53 |
||||||
|
+ lnia 3 |
||||||
|
addpcis 3,0 |
||||||
|
subpcis 3,0 |
||||||
|
addpcis 4,1 |
||||||
|
@@ -382,3 +383,6 @@ power9: |
||||||
|
mffscrni 30,0 |
||||||
|
mffscrni 30,3 |
||||||
|
mffsl 31 |
||||||
|
+ scv 0 |
||||||
|
+ scv 127 |
||||||
|
+ rfscv |
||||||
|
diff -rup binutils.orig/opcodes/ppc-opc.c binutils-2.27/opcodes/ppc-opc.c |
||||||
|
--- binutils.orig/opcodes/ppc-opc.c 2017-09-13 09:46:21.874331577 +0100 |
||||||
|
+++ binutils-2.27/opcodes/ppc-opc.c 2017-09-13 09:55:18.745229836 +0100 |
||||||
|
@@ -441,7 +441,7 @@ const struct powerpc_operand powerpc_ope |
||||||
|
#define L2OPT L32OPT + 1 |
||||||
|
{ 0x3, 21, NULL, NULL, PPC_OPERAND_OPTIONAL }, |
||||||
|
|
||||||
|
- /* The LEV field in a POWER SVC form instruction. */ |
||||||
|
+ /* The LEV field in a POWER SVC / POWER9 SCV form instruction. */ |
||||||
|
#define SVC_LEV L2OPT + 1 |
||||||
|
{ 0x7f, 5, NULL, NULL, 0 }, |
||||||
|
|
||||||
|
@@ -2447,6 +2447,9 @@ extract_vleil (unsigned long insn, |
||||||
|
#define DX(op, xop) (OP (op) | ((((unsigned long)(xop)) & 0x1f) << 1)) |
||||||
|
#define DX_MASK DX (0x3f, 0x1f) |
||||||
|
|
||||||
|
+/* An DX form instruction with the D bits specified. */ |
||||||
|
+#define NODX_MASK (DX_MASK | 0x1fffc1) |
||||||
|
+ |
||||||
|
/* An EVSEL form instruction. */ |
||||||
|
#define EVSEL(op, xop) (OP (op) | (((unsigned long)(xop)) & 0xff) << 3) |
||||||
|
#define EVSEL_MASK EVSEL(0x3f, 0xff) |
||||||
|
@@ -4145,6 +4148,7 @@ const struct powerpc_opcode powerpc_opco |
||||||
|
{"bcla", B(16,1,1), B_MASK, COM, PPCVLE, {BO, BI, BDA}}, |
||||||
|
|
||||||
|
{"svc", SC(17,0,0), SC_MASK, POWER, PPCVLE, {SVC_LEV, FL1, FL2}}, |
||||||
|
+{"scv", SC(17,0,1), SC_MASK, POWER9, PPCVLE, {SVC_LEV}}, |
||||||
|
{"svcl", SC(17,0,1), SC_MASK, POWER, PPCVLE, {SVC_LEV, FL1, FL2}}, |
||||||
|
{"sc", SC(17,1,0), SC_MASK, PPC, PPCVLE, {LEV}}, |
||||||
|
{"svca", SC(17,1,0), SC_MASK, PWRCOM, PPCVLE, {SV}}, |
||||||
|
@@ -4157,6 +4161,7 @@ const struct powerpc_opcode powerpc_opco |
||||||
|
|
||||||
|
{"mcrf", XL(19,0), XLBB_MASK|(3<<21)|(3<<16), COM, PPCVLE, {BF, BFA}}, |
||||||
|
|
||||||
|
+{"lnia", DX(19,2), NODX_MASK, POWER9, PPCVLE, {RT}}, |
||||||
|
{"addpcis", DX(19,2), DX_MASK, POWER9, PPCVLE, {RT, DXD}}, |
||||||
|
{"subpcis", DX(19,2), DX_MASK, POWER9, PPCVLE, {RT, NDXD}}, |
||||||
|
|
||||||
|
@@ -4394,6 +4399,7 @@ const struct powerpc_opcode powerpc_opco |
||||||
|
{"rfi", XL(19,50), 0xffffffff, COM, PPCVLE, {0}}, |
||||||
|
{"rfci", XL(19,51), 0xffffffff, PPC403|BOOKE|PPCE300|PPCA2|PPC476, PPCVLE, {0}}, |
||||||
|
|
||||||
|
+{"rfscv", XL(19,82), 0xffffffff, POWER9, PPCVLE, {0}}, |
||||||
|
{"rfsvc", XL(19,82), 0xffffffff, POWER, PPCVLE, {0}}, |
||||||
|
|
||||||
|
{"rfgi", XL(19,102), 0xffffffff, E500MC|PPCA2, PPCVLE, {0}}, |
@ -0,0 +1,452 @@ |
|||||||
|
diff -rup binutils-2.27.orig/bfd/elf32-ppc.c binutils-2.27/bfd/elf32-ppc.c |
||||||
|
--- binutils-2.27.orig/bfd/elf32-ppc.c 2016-09-28 08:49:28.280430815 +0100 |
||||||
|
+++ binutils-2.27/bfd/elf32-ppc.c 2016-09-28 08:53:48.133843615 +0100 |
||||||
|
@@ -3946,7 +3946,8 @@ is_branch_reloc (enum elf_ppc_reloc_type |
||||||
|
|| r_type == R_PPC_ADDR24 |
||||||
|
|| r_type == R_PPC_ADDR14 |
||||||
|
|| r_type == R_PPC_ADDR14_BRTAKEN |
||||||
|
- || r_type == R_PPC_ADDR14_BRNTAKEN); |
||||||
|
+ || r_type == R_PPC_ADDR14_BRNTAKEN |
||||||
|
+ || r_type == R_PPC_VLE_REL24); |
||||||
|
} |
||||||
|
|
||||||
|
static void |
||||||
|
@@ -4897,6 +4898,7 @@ ppc_elf_vle_split16 (bfd *output_bfd, bf |
||||||
|
insn = bfd_get_32 (output_bfd, loc); |
||||||
|
top5 = value & 0xf800; |
||||||
|
top5 = top5 << (split16_format == split16a_type ? 9 : 5); |
||||||
|
+ insn &= (split16_format == split16a_type ? ~0x1f007ff : ~0x1f07ff); |
||||||
|
insn |= top5; |
||||||
|
insn |= value & 0x7ff; |
||||||
|
bfd_put_32 (output_bfd, insn, loc); |
||||||
|
diff -rup binutils-2.27.orig/gas/testsuite/gas/ppc/power9.d binutils-2.27/gas/testsuite/gas/ppc/power9.d |
||||||
|
--- binutils-2.27.orig/gas/testsuite/gas/ppc/power9.d 2016-09-28 08:49:28.783433550 +0100 |
||||||
|
+++ binutils-2.27/gas/testsuite/gas/ppc/power9.d 2016-09-28 08:53:47.423839755 +0100 |
||||||
|
@@ -280,14 +280,6 @@ Disassembly of section \.text: |
||||||
|
.*: (7f a8 49 80|80 49 a8 7f) cmprb cr7,1,r8,r9 |
||||||
|
.*: (7d e0 01 00|00 01 e0 7d) setb r15,cr0 |
||||||
|
.*: (7d fc 01 00|00 01 fc 7d) setb r15,cr7 |
||||||
|
-.*: (7e 00 01 01|01 01 00 7e) setbool r16,lt |
||||||
|
-.*: (7e 01 01 01|01 01 01 7e) setbool r16,gt |
||||||
|
-.*: (7e 02 01 01|01 01 02 7e) setbool r16,eq |
||||||
|
-.*: (7e 03 01 01|01 01 03 7e) setbool r16,so |
||||||
|
-.*: (7e 1c 01 01|01 01 1c 7e) setbool r16,4\*cr7\+lt |
||||||
|
-.*: (7e 1d 01 01|01 01 1d 7e) setbool r16,4\*cr7\+gt |
||||||
|
-.*: (7e 1e 01 01|01 01 1e 7e) setbool r16,4\*cr7\+eq |
||||||
|
-.*: (7e 1f 01 01|01 01 1f 7e) setbool r16,4\*cr7\+so |
||||||
|
.*: (7f 40 52 1a|1a 52 40 7f) lxvl vs26,0,r10 |
||||||
|
.*: (7f 14 52 1b|1b 52 14 7f) lxvl vs56,r20,r10 |
||||||
|
.*: (7f 60 5b 1a|1a 5b 60 7f) stxvl vs27,0,r11 |
||||||
|
@@ -331,6 +323,7 @@ Disassembly of section \.text: |
||||||
|
.*: (4c e0 80 04|04 80 e0 4c) addpcis r7,-32768 |
||||||
|
.*: (4c e0 80 04|04 80 e0 4c) addpcis r7,-32768 |
||||||
|
.*: (7c 00 02 a4|a4 02 00 7c) slbsync |
||||||
|
+.*: (7d 40 06 a4|a4 06 40 7d) slbiag r10 |
||||||
|
.*: (7d 40 5b a4|a4 5b 40 7d) slbieg r10,r11 |
||||||
|
.*: (7c 60 27 26|26 27 60 7c) slbmfee r3,r4 |
||||||
|
.*: (7c 60 27 26|26 27 60 7c) slbmfee r3,r4 |
||||||
|
@@ -344,14 +337,9 @@ Disassembly of section \.text: |
||||||
|
.*: (7c 00 1a 24|24 1a 00 7c) tlbiel r3 |
||||||
|
.*: (7c 00 1a 24|24 1a 00 7c) tlbiel r3 |
||||||
|
.*: (7c 8f 1a 24|24 1a 8f 7c) tlbiel r3,r4,3,1,1 |
||||||
|
-.*: (7c 0c 6e 0c|0c 6e 0c 7c) copy r12,r13 |
||||||
|
-.*: (7c 2c 6e 0c|0c 6e 2c 7c) copy_first r12,r13 |
||||||
|
-.*: (7c 2c 6e 0c|0c 6e 2c 7c) copy_first r12,r13 |
||||||
|
-.*: (7c 0a 5f 0c|0c 5f 0a 7c) paste r10,r11 |
||||||
|
-.*: (7c 0a 5f 0c|0c 5f 0a 7c) paste r10,r11 |
||||||
|
-.*: (7c 2a 5f 0d|0d 5f 2a 7c) paste_last r10,r11 |
||||||
|
-.*: (7c 2a 5f 0d|0d 5f 2a 7c) paste_last r10,r11 |
||||||
|
-.*: (7c 00 06 8c|8c 06 00 7c) cp_abort |
||||||
|
+.*: (7c 2c 6e 0c|0c 6e 2c 7c) copy r12,r13 |
||||||
|
+.*: (7c 2a 5f 0d|0d 5f 2a 7c) paste\. r10,r11 |
||||||
|
+.*: (7c 00 06 8c|8c 06 00 7c) cpabort |
||||||
|
.*: (7c 00 04 ac|ac 04 00 7c) hwsync |
||||||
|
.*: (7c 00 04 ac|ac 04 00 7c) hwsync |
||||||
|
.*: (7c 00 04 ac|ac 04 00 7c) hwsync |
||||||
|
@@ -359,8 +347,6 @@ Disassembly of section \.text: |
||||||
|
.*: (7c 20 04 ac|ac 04 20 7c) lwsync |
||||||
|
.*: (7c 40 04 ac|ac 04 40 7c) ptesync |
||||||
|
.*: (7c 40 04 ac|ac 04 40 7c) ptesync |
||||||
|
-.*: (7c 07 04 ac|ac 04 07 7c) sync 0,7 |
||||||
|
-.*: (7c 28 04 ac|ac 04 28 7c) sync 1,8 |
||||||
|
.*: (7e 80 04 cc|cc 04 80 7e) ldat r20,0,0 |
||||||
|
.*: (7e 8a e4 cc|cc e4 8a 7e) ldat r20,r10,28 |
||||||
|
.*: (7e a0 04 8c|8c 04 a0 7e) lwat r21,0,0 |
||||||
|
@@ -373,8 +359,6 @@ Disassembly of section \.text: |
||||||
|
.*: (7c 00 f6 e4|e4 f6 00 7c) rmieg r30 |
||||||
|
.*: (7d 40 7a 6a|6a 7a 40 7d) ldmx r10,0,r15 |
||||||
|
.*: (7d 43 7a 6a|6a 7a 43 7d) ldmx r10,r3,r15 |
||||||
|
-.*: (7d 60 83 6a|6a 83 60 7d) lwzmx r11,0,r16 |
||||||
|
-.*: (7d 63 83 6a|6a 83 63 7d) lwzmx r11,r3,r16 |
||||||
|
.*: (4c 00 02 e4|e4 02 00 4c) stop |
||||||
|
.*: (7c 00 00 3c|3c 00 00 7c) wait |
||||||
|
.*: (7c 00 00 3c|3c 00 00 7c) wait |
||||||
|
@@ -397,9 +381,6 @@ Disassembly of section \.text: |
||||||
|
.*: (7d 6c 69 54|54 69 6c 7d) addex r11,r12,r13,0 |
||||||
|
.*: (7d 6c 6b 54|54 6b 6c 7d) addex r11,r12,r13,1 |
||||||
|
.*: (7d 6c 6d 54|54 6d 6c 7d) addex r11,r12,r13,2 |
||||||
|
-.*: (7e b6 b9 55|55 b9 b6 7e) addex\. r21,r22,r23,0 |
||||||
|
-.*: (7e b6 bb 55|55 bb b6 7e) addex\. r21,r22,r23,1 |
||||||
|
-.*: (7e b6 bd 55|55 bd b6 7e) addex\. r21,r22,r23,2 |
||||||
|
.*: (ff 20 04 8e|8e 04 20 ff) mffs f25 |
||||||
|
.*: (ff 20 04 8f|8f 04 20 ff) mffs\. f25 |
||||||
|
.*: (ff 41 04 8e|8e 04 41 ff) mffsce f26 |
||||||
|
@@ -410,12 +391,4 @@ Disassembly of section \.text: |
||||||
|
.*: (ff d7 04 8e|8e 04 d7 ff) mffscrni f30,0 |
||||||
|
.*: (ff d7 1c 8e|8e 1c d7 ff) mffscrni f30,3 |
||||||
|
.*: (ff f8 04 8e|8e 04 f8 ff) mffsl f31 |
||||||
|
-.*: (7e 8a 01 76|76 01 8a 7e) brd r10,r20 |
||||||
|
-.*: (7e ab 01 b6|b6 01 ab 7e) brh r11,r21 |
||||||
|
-.*: (7e cc 01 36|36 01 cc 7e) brw r12,r22 |
||||||
|
-.*: (11 6a 63 77|77 63 6a 11) nandxor r10,r11,r12,r13 |
||||||
|
-.*: (12 b4 b5 f6|f6 b5 b4 12) xor3 r20,r21,r22,r23 |
||||||
|
-.*: (11 6a 60 34|34 60 6a 11) rldixor r10,r11,0,r12 |
||||||
|
-.*: (11 6a 66 f4|f4 66 6a 11) rldixor r10,r11,27,r12 |
||||||
|
-.*: (11 6a 67 f5|f5 67 6a 11) rldixor r10,r11,63,r12 |
||||||
|
#pass |
||||||
|
diff -rup binutils-2.27.orig/gas/testsuite/gas/ppc/power9.s binutils-2.27/gas/testsuite/gas/ppc/power9.s |
||||||
|
--- binutils-2.27.orig/gas/testsuite/gas/ppc/power9.s 2016-09-28 08:49:28.783433550 +0100 |
||||||
|
+++ binutils-2.27/gas/testsuite/gas/ppc/power9.s 2016-09-28 08:53:47.424839761 +0100 |
||||||
|
@@ -271,14 +271,6 @@ power9: |
||||||
|
cmprb 7,1,8,9 |
||||||
|
setb 15,0 |
||||||
|
setb 15,7 |
||||||
|
- setbool 16,0 |
||||||
|
- setbool 16,1 |
||||||
|
- setbool 16,2 |
||||||
|
- setbool 16,3 |
||||||
|
- setbool 16,28 |
||||||
|
- setbool 16,29 |
||||||
|
- setbool 16,30 |
||||||
|
- setbool 16,31 |
||||||
|
lxvl 26,0,10 |
||||||
|
lxvl 56,20,10 |
||||||
|
stxvl 27,0,11 |
||||||
|
@@ -322,6 +314,7 @@ power9: |
||||||
|
addpcis 7,-0x8000 |
||||||
|
subpcis 7,0x8000 |
||||||
|
slbsync |
||||||
|
+ slbiag 10 |
||||||
|
slbieg 10,11 |
||||||
|
slbmfee 3,4 |
||||||
|
slbmfee 3,4,0 |
||||||
|
@@ -335,23 +328,16 @@ power9: |
||||||
|
tlbiel 3 |
||||||
|
tlbiel 3,0,0,0,0 |
||||||
|
tlbiel 3,4,3,1,1 |
||||||
|
- copy 12,13,0 |
||||||
|
- copy_first 12,13 |
||||||
|
- copy 12,13,1 |
||||||
|
- paste 10,11,0 |
||||||
|
- paste 10,11 |
||||||
|
- paste. 10,11,1 |
||||||
|
- paste_last 10,11 |
||||||
|
- cp_abort |
||||||
|
+ copy 12,13 |
||||||
|
+ paste. 10,11 |
||||||
|
+ cpabort |
||||||
|
hwsync |
||||||
|
sync |
||||||
|
- sync 0,0x0 |
||||||
|
+ sync 0 |
||||||
|
lwsync |
||||||
|
- sync 1,0x0 |
||||||
|
+ sync 1 |
||||||
|
ptesync |
||||||
|
- sync 2,0x0 |
||||||
|
- sync 0,0x7 |
||||||
|
- sync 1,0x8 |
||||||
|
+ sync 2 |
||||||
|
ldat 20,0,0x0 |
||||||
|
ldat 20,10,0x1c |
||||||
|
lwat 21,0,0x0 |
||||||
|
@@ -364,8 +350,6 @@ power9: |
||||||
|
rmieg 30 |
||||||
|
ldmx 10,0,15 |
||||||
|
ldmx 10,3,15 |
||||||
|
- lwzmx 11,0,16 |
||||||
|
- lwzmx 11,3,16 |
||||||
|
stop |
||||||
|
wait |
||||||
|
wait 0 |
||||||
|
@@ -388,9 +372,6 @@ power9: |
||||||
|
addex 11,12,13,0 |
||||||
|
addex 11,12,13,1 |
||||||
|
addex 11,12,13,2 |
||||||
|
- addex. 21,22,23,0 |
||||||
|
- addex. 21,22,23,1 |
||||||
|
- addex. 21,22,23,2 |
||||||
|
mffs 25 |
||||||
|
mffs. 25 |
||||||
|
mffsce 26 |
||||||
|
@@ -401,11 +382,3 @@ power9: |
||||||
|
mffscrni 30,0 |
||||||
|
mffscrni 30,3 |
||||||
|
mffsl 31 |
||||||
|
- brd 10,20 |
||||||
|
- brh 11,21 |
||||||
|
- brw 12,22 |
||||||
|
- nandxor 10,11,12,13 |
||||||
|
- xor3 20,21,22,23 |
||||||
|
- rldixor 10,11,0,12 |
||||||
|
- rldixor 10,11,27,12 |
||||||
|
- rldixor 10,11,63,12 |
||||||
|
diff -rup binutils-2.27.orig/include/opcode/ppc.h binutils-2.27/include/opcode/ppc.h |
||||||
|
--- binutils-2.27.orig/include/opcode/ppc.h 2016-09-28 08:49:28.845433887 +0100 |
||||||
|
+++ binutils-2.27/include/opcode/ppc.h 2016-09-28 08:53:48.132843610 +0100 |
||||||
|
@@ -214,6 +214,9 @@ extern const int vle_num_opcodes; |
||||||
|
/* Opcode is supported by Vector-Scalar (VSX) Unit from ISA 2.08. */ |
||||||
|
#define PPC_OPCODE_VSX3 0x40000000000ull |
||||||
|
|
||||||
|
+/* Opcode is supported by e200z4. */ |
||||||
|
+#define PPC_OPCODE_E200Z4 0x80000000000ull |
||||||
|
+ |
||||||
|
/* A macro to extract the major opcode from an instruction. */ |
||||||
|
#define PPC_OP(i) (((i) >> 26) & 0x3f) |
||||||
|
|
||||||
|
diff -rup binutils-2.27.orig/opcodes/ppc-dis.c binutils-2.27/opcodes/ppc-dis.c |
||||||
|
--- binutils-2.27.orig/opcodes/ppc-dis.c 2016-09-28 08:49:29.236436013 +0100 |
||||||
|
+++ binutils-2.27/opcodes/ppc-dis.c 2016-09-28 08:58:35.525406139 +0100 |
||||||
|
@@ -105,6 +105,11 @@ struct ppc_mopt ppc_opts[] = { |
||||||
|
0 }, |
||||||
|
{ "com", PPC_OPCODE_COMMON, |
||||||
|
0 }, |
||||||
|
+ { "e200z4", (PPC_OPCODE_PPC | PPC_OPCODE_BOOKE| PPC_OPCODE_SPE |
||||||
|
+ | PPC_OPCODE_ISEL | PPC_OPCODE_EFS | PPC_OPCODE_BRLOCK |
||||||
|
+ | PPC_OPCODE_PMR | PPC_OPCODE_CACHELCK | PPC_OPCODE_RFMCI |
||||||
|
+ | PPC_OPCODE_E500 | PPC_OPCODE_E200Z4), |
||||||
|
+ PPC_OPCODE_VLE }, |
||||||
|
{ "e300", PPC_OPCODE_PPC | PPC_OPCODE_E300, |
||||||
|
0 }, |
||||||
|
{ "e500", (PPC_OPCODE_PPC | PPC_OPCODE_BOOKE | PPC_OPCODE_SPE |
||||||
|
diff -rup binutils-2.27.orig/opcodes/ppc-opc.c binutils-2.27/opcodes/ppc-opc.c |
||||||
|
--- binutils-2.27.orig/opcodes/ppc-opc.c 2016-09-28 08:49:29.236436013 +0100 |
||||||
|
+++ binutils-2.27/opcodes/ppc-opc.c 2016-09-28 08:58:16.374302016 +0100 |
||||||
|
@@ -2374,6 +2374,12 @@ extract_vleil (unsigned long insn, |
||||||
|
#define OPVUP(x,vup) (OP (x) | ((((unsigned long)(vup)) & 0xff) << 8)) |
||||||
|
#define OPVUP_MASK OPVUP (0x3f, 0xff) |
||||||
|
|
||||||
|
+/* The main opcode combined with an update code and the RT fields specified in |
||||||
|
+ D form instruction. Used for VLE volatile context save/restore |
||||||
|
+ instructions. */ |
||||||
|
+#define OPVUPRT(x,vup,rt) (OPVUP (x, vup) | ((((unsigned long)(rt)) & 0x1f) << 21)) |
||||||
|
+#define OPVUPRT_MASK OPVUPRT (0x3f, 0xff, 0x1f) |
||||||
|
+ |
||||||
|
/* An A form instruction. */ |
||||||
|
#define A(op, xop, rc) (OP (op) | ((((unsigned long)(xop)) & 0x1f) << 1) | (((unsigned long)(rc)) & 1)) |
||||||
|
#define A_MASK A (0x3f, 0x1f, 1) |
||||||
|
@@ -3055,6 +3061,7 @@ extract_vleil (unsigned long insn, |
||||||
|
#define E6500 PPC_OPCODE_E6500 |
||||||
|
#define PPCVLE PPC_OPCODE_VLE |
||||||
|
#define PPCHTM PPC_OPCODE_HTM |
||||||
|
+#define E200Z4 PPC_OPCODE_E200Z4 |
||||||
|
/* The list of embedded processors that use the embedded operand ordering |
||||||
|
for the 3 operand dcbt and dcbtst instructions. */ |
||||||
|
#define DCBT_EO (PPC_OPCODE_E500 | PPC_OPCODE_E500MC | PPC_OPCODE_476 \ |
||||||
|
@@ -3161,7 +3168,6 @@ const struct powerpc_opcode powerpc_opco |
||||||
|
{"machhwu.", XO (4, 12,0,1), XO_MASK, MULHW, 0, {RT, RA, RB}}, |
||||||
|
{"ps_muls1", A (4, 13,0), AFRB_MASK, PPCPS, 0, {FRT, FRA, FRC}}, |
||||||
|
{"ps_muls1.", A (4, 13,1), AFRB_MASK, PPCPS, 0, {FRT, FRA, FRC}}, |
||||||
|
-{"rldixor", VXASH(4,26), VXASH_MASK, POWER9, 0, {RA, RS, SH6, RB}}, |
||||||
|
{"ps_madds0", A (4, 14,0), A_MASK, PPCPS, 0, {FRT, FRA, FRC, FRB}}, |
||||||
|
{"ps_madds0.", A (4, 14,1), A_MASK, PPCPS, 0, {FRT, FRA, FRC, FRB}}, |
||||||
|
{"ps_madds1", A (4, 15,0), A_MASK, PPCPS, 0, {FRT, FRA, FRC, FRB}}, |
||||||
|
@@ -3203,8 +3209,6 @@ const struct powerpc_opcode powerpc_opco |
||||||
|
{"ps_msub.", A (4, 28,1), A_MASK, PPCPS, 0, {FRT, FRA, FRC, FRB}}, |
||||||
|
{"ps_madd", A (4, 29,0), A_MASK, PPCPS, 0, {FRT, FRA, FRC, FRB}}, |
||||||
|
{"ps_madd.", A (4, 29,1), A_MASK, PPCPS, 0, {FRT, FRA, FRC, FRB}}, |
||||||
|
-{"xor3", VXA(4, 54), VXA_MASK, POWER9, 0, {RA, RS, RB, RC}}, |
||||||
|
-{"nandxor", VXA(4, 55), VXA_MASK, POWER9, 0, {RA, RS, RB, RC}}, |
||||||
|
{"vpermr", VXA(4, 59), VXA_MASK, PPCVEC3, 0, {VD, VA, VB, VC}}, |
||||||
|
{"ps_nmsub", A (4, 30,0), A_MASK, PPCPS, 0, {FRT, FRA, FRC, FRB}}, |
||||||
|
{"vaddeuqm", VXA(4, 60), VXA_MASK, PPCVEC2, 0, {VD, VA, VB, VC}}, |
||||||
|
@@ -4943,8 +4947,7 @@ const struct powerpc_opcode powerpc_opco |
||||||
|
|
||||||
|
{"dcbfep", XRT(31,127,0), XRT_MASK, E500MC|PPCA2, 0, {RA0, RB}}, |
||||||
|
|
||||||
|
-{"setb", VX(31,256), VXVB_MASK|(3<<16), POWER9, 0, {RT, BFA}}, |
||||||
|
-{"setbool", VX(31,257), VXVB_MASK, POWER9, 0, {RT, BA}}, |
||||||
|
+{"setb", X(31,128), XRB_MASK|(3<<16), POWER9, 0, {RT, BFA}}, |
||||||
|
|
||||||
|
{"wrtee", X(31,131), XRARB_MASK, PPC403|BOOKE|PPCA2|PPC476, 0, {RS}}, |
||||||
|
|
||||||
|
@@ -4994,8 +4997,6 @@ const struct powerpc_opcode powerpc_opco |
||||||
|
|
||||||
|
{"prtyw", X(31,154), XRB_MASK, POWER6|PPCA2|PPC476, 0, {RA, RS}}, |
||||||
|
|
||||||
|
-{"brw", X(31,155), XRB_MASK, POWER9, 0, {RA, RS}}, |
||||||
|
- |
||||||
|
{"stdepx", X(31,157), X_MASK, E500MC|PPCA2, 0, {RS, RA0, RB}}, |
||||||
|
|
||||||
|
{"stwepx", X(31,159), X_MASK, E500MC|PPCA2, 0, {RS, RA0, RB}}, |
||||||
|
@@ -5008,7 +5009,6 @@ const struct powerpc_opcode powerpc_opco |
||||||
|
{"sthfcmx", APU(31,167,0), APU_MASK, PPC405, 0, {FCRT, RA, RB}}, |
||||||
|
|
||||||
|
{"addex", ZRC(31,170,0), Z2_MASK, POWER9, 0, {RT, RA, RB, CY}}, |
||||||
|
-{"addex.", ZRC(31,170,1), Z2_MASK, POWER9, 0, {RT, RA, RB, CY}}, |
||||||
|
|
||||||
|
{"msgclrp", XRTRA(31,174,0,0), XRTRA_MASK, POWER8, 0, {RB}}, |
||||||
|
{"dcbtlse", X(31,174), X_MASK, PPCCHLK, E500MC, {CT, RA0, RB}}, |
||||||
|
@@ -5033,8 +5033,6 @@ const struct powerpc_opcode powerpc_opco |
||||||
|
|
||||||
|
{"prtyd", X(31,186), XRB_MASK, POWER6|PPCA2, 0, {RA, RS}}, |
||||||
|
|
||||||
|
-{"brd", X(31,187), XRB_MASK, POWER9, 0, {RA, RS}}, |
||||||
|
- |
||||||
|
{"cmprb", X(31,192), XCMP_MASK, POWER9, 0, {BF, L, RA, RB}}, |
||||||
|
|
||||||
|
{"icblq.", XRC(31,198,1), X_MASK, E6500, 0, {CT, RA0, RB}}, |
||||||
|
@@ -5073,8 +5071,6 @@ const struct powerpc_opcode powerpc_opco |
||||||
|
{"sleq", XRC(31,217,0), X_MASK, M601, 0, {RA, RS, RB}}, |
||||||
|
{"sleq.", XRC(31,217,1), X_MASK, M601, 0, {RA, RS, RB}}, |
||||||
|
|
||||||
|
-{"brh", X(31,219), XRB_MASK, POWER9, 0, {RA, RS}}, |
||||||
|
- |
||||||
|
{"stbepx", X(31,223), X_MASK, E500MC|PPCA2, 0, {RS, RA0, RB}}, |
||||||
|
|
||||||
|
{"cmpeqb", X(31,224), XCMPL_MASK, POWER9, 0, {BF, RA, RB}}, |
||||||
|
@@ -5541,8 +5537,6 @@ const struct powerpc_opcode powerpc_opco |
||||||
|
|
||||||
|
{"mtvsrdd", X(31,435), XX1_MASK, PPCVSX3, 0, {XT6, RA0, RB}}, |
||||||
|
|
||||||
|
-{"lwzmx", X(31,437), X_MASK, POWER9, 0, {RT, RA0, RB}}, |
||||||
|
- |
||||||
|
{"ecowx", X(31,438), X_MASK, PPC, E500|TITAN, {RT, RA0, RB}}, |
||||||
|
|
||||||
|
{"sthux", X(31,439), X_MASK, COM, 0, {RS, RAS, RB}}, |
||||||
|
@@ -5815,6 +5809,7 @@ const struct powerpc_opcode powerpc_opco |
||||||
|
|
||||||
|
{"mcrxr", X(31,512), XBFRARB_MASK, COM, POWER7, {BF}}, |
||||||
|
|
||||||
|
+{"lbdcbx", X(31,514), X_MASK, E200Z4, 0, {RT, RA, RB}}, |
||||||
|
{"lbdx", X(31,515), X_MASK, E500MC, 0, {RT, RA, RB}}, |
||||||
|
|
||||||
|
{"bblels", X(31,518), X_MASK, PPCBRLK, 0, {0}}, |
||||||
|
@@ -5865,6 +5860,7 @@ const struct powerpc_opcode powerpc_opco |
||||||
|
{"maskir", XRC(31,541,0), X_MASK, M601, 0, {RA, RS, RB}}, |
||||||
|
{"maskir.", XRC(31,541,1), X_MASK, M601, 0, {RA, RS, RB}}, |
||||||
|
|
||||||
|
+{"lhdcbx", X(31,546), X_MASK, E200Z4, 0, {RT, RA, RB}}, |
||||||
|
{"lhdx", X(31,547), X_MASK, E500MC, 0, {RT, RA, RB}}, |
||||||
|
|
||||||
|
{"lvtrx", X(31,549), X_MASK, PPCVEC2, 0, {VD, RA0, RB}}, |
||||||
|
@@ -5888,6 +5884,7 @@ const struct powerpc_opcode powerpc_opco |
||||||
|
|
||||||
|
{"mcrxrx", X(31,576), XBFRARB_MASK, POWER9, 0, {BF}}, |
||||||
|
|
||||||
|
+{"lwdcbx", X(31,578), X_MASK, E200Z4, 0, {RT, RA, RB}}, |
||||||
|
{"lwdx", X(31,579), X_MASK, E500MC, 0, {RT, RA, RB}}, |
||||||
|
|
||||||
|
{"lvtlx", X(31,581), X_MASK, PPCVEC2, 0, {VD, RA0, RB}}, |
||||||
|
@@ -5906,8 +5903,8 @@ const struct powerpc_opcode powerpc_opco |
||||||
|
{"hwsync", XSYNC(31,598,0), 0xffffffff, POWER4, BOOKE|PPC476, {0}}, |
||||||
|
{"lwsync", XSYNC(31,598,1), 0xffffffff, PPC, E500, {0}}, |
||||||
|
{"ptesync", XSYNC(31,598,2), 0xffffffff, PPC64, 0, {0}}, |
||||||
|
-{"sync", X(31,598), XSYNCLE_MASK, POWER9|E6500, 0, {LS, ESYNC}}, |
||||||
|
-{"sync", X(31,598), XSYNC_MASK, PPCCOM, BOOKE|PPC476|POWER9, {LS}}, |
||||||
|
+{"sync", X(31,598), XSYNCLE_MASK, E6500, 0, {LS, ESYNC}}, |
||||||
|
+{"sync", X(31,598), XSYNC_MASK, PPCCOM, BOOKE|PPC476, {LS}}, |
||||||
|
{"msync", X(31,598), 0xffffffff, BOOKE|PPCA2|PPC476, 0, {0}}, |
||||||
|
{"sync", X(31,598), 0xffffffff, BOOKE|PPC476, E6500, {0}}, |
||||||
|
{"lwsync", X(31,598), 0xffffffff, E500, 0, {0}}, |
||||||
|
@@ -5938,6 +5935,7 @@ const struct powerpc_opcode powerpc_opco |
||||||
|
|
||||||
|
{"lfdux", X(31,631), X_MASK, COM, PPCEFS, {FRT, RAS, RB}}, |
||||||
|
|
||||||
|
+{"stbdcbx", X(31,642), X_MASK, E200Z4, 0, {RS, RA, RB}}, |
||||||
|
{"stbdx", X(31,643), X_MASK, E500MC, 0, {RS, RA, RB}}, |
||||||
|
|
||||||
|
{"stvlx", X(31,647), X_MASK, CELL, 0, {VS, RA0, RB}}, |
||||||
|
@@ -5975,6 +5973,7 @@ const struct powerpc_opcode powerpc_opco |
||||||
|
{"sre", XRC(31,665,0), X_MASK, M601, 0, {RA, RS, RB}}, |
||||||
|
{"sre.", XRC(31,665,1), X_MASK, M601, 0, {RA, RS, RB}}, |
||||||
|
|
||||||
|
+{"sthdcbx", X(31,674), X_MASK, E200Z4, 0, {RS, RA, RB}}, |
||||||
|
{"sthdx", X(31,675), X_MASK, E500MC, 0, {RS, RA, RB}}, |
||||||
|
|
||||||
|
{"stvfrx", X(31,677), X_MASK, PPCVEC2, 0, {VS, RA0, RB}}, |
||||||
|
@@ -5992,6 +5991,7 @@ const struct powerpc_opcode powerpc_opco |
||||||
|
{"sriq", XRC(31,696,0), X_MASK, M601, 0, {RA, RS, SH}}, |
||||||
|
{"sriq.", XRC(31,696,1), X_MASK, M601, 0, {RA, RS, SH}}, |
||||||
|
|
||||||
|
+{"stwdcbx", X(31,706), X_MASK, E200Z4, 0, {RS, RA, RB}}, |
||||||
|
{"stwdx", X(31,707), X_MASK, E500MC, 0, {RS, RA, RB}}, |
||||||
|
|
||||||
|
{"stvflx", X(31,709), X_MASK, PPCVEC2, 0, {VS, RA0, RB}}, |
||||||
|
@@ -6072,8 +6072,7 @@ const struct powerpc_opcode powerpc_opco |
||||||
|
|
||||||
|
{"lvsm", X(31,773), X_MASK, PPCVEC2, 0, {VD, RA0, RB}}, |
||||||
|
|
||||||
|
-{"copy_first", XOPL(31,774,1), XRT_MASK, POWER9, 0, {RA0, RB}}, |
||||||
|
-{"copy", X(31,774), XLRT_MASK, POWER9, 0, {RA0, RB, L}}, |
||||||
|
+{"copy", XOPL(31,774,1), XRT_MASK, POWER9, 0, {RA0, RB}}, |
||||||
|
|
||||||
|
{"stvepxl", X(31,775), X_MASK, PPCVEC2, 0, {VS, RA0, RB}}, |
||||||
|
{"lvlxl", X(31,775), X_MASK, CELL, 0, {VD, RA0, RB}}, |
||||||
|
@@ -6143,7 +6142,7 @@ const struct powerpc_opcode powerpc_opco |
||||||
|
|
||||||
|
{"lvtlxl", X(31,837), X_MASK, PPCVEC2, 0, {VD, RA0, RB}}, |
||||||
|
|
||||||
|
-{"cp_abort", X(31,838), XRTRARB_MASK,POWER9, 0, {0}}, |
||||||
|
+{"cpabort", X(31,838), XRTRARB_MASK,POWER9, 0, {0}}, |
||||||
|
|
||||||
|
{"divo", XO(31,331,1,0), XO_MASK, M601, 0, {RT, RA, RB}}, |
||||||
|
{"divo.", XO(31,331,1,1), XO_MASK, M601, 0, {RT, RA, RB}}, |
||||||
|
@@ -6155,6 +6154,7 @@ const struct powerpc_opcode powerpc_opco |
||||||
|
|
||||||
|
{"tlbsrx.", XRC(31,850,1), XRT_MASK, PPCA2, 0, {RA0, RB}}, |
||||||
|
|
||||||
|
+{"slbiag", X(31,850), XRARB_MASK, POWER9, 0, {RS}}, |
||||||
|
{"slbmfev", X(31,851), XRLA_MASK, POWER9, 0, {RT, RB, A_L}}, |
||||||
|
{"slbmfev", X(31,851), XRA_MASK, PPC64, POWER9, {RT, RB}}, |
||||||
|
|
||||||
|
@@ -6190,9 +6190,7 @@ const struct powerpc_opcode powerpc_opco |
||||||
|
{"extswsli", XS(31,445,0), XS_MASK, POWER9, 0, {RA, RS, SH6}}, |
||||||
|
{"extswsli.", XS(31,445,1), XS_MASK, POWER9, 0, {RA, RS, SH6}}, |
||||||
|
|
||||||
|
-{"paste", XRC(31,902,0), XLRT_MASK, POWER9, 0, {RA0, RB, L0}}, |
||||||
|
-{"paste_last", XRCL(31,902,1,1),XRT_MASK, POWER9, 0, {RA0, RB}}, |
||||||
|
-{"paste.", XRC(31,902,1), XLRT_MASK, POWER9, 0, {RA0, RB, L1}}, |
||||||
|
+{"paste.", XRCL(31,902,1,1),XRT_MASK, POWER9, 0, {RA0, RB}}, |
||||||
|
|
||||||
|
{"stvlxl", X(31,903), X_MASK, CELL, 0, {VS, RA0, RB}}, |
||||||
|
{"stdfcmux", APU(31,903,0), APU_MASK, PPC405, 0, {FCRT, RA, RB}}, |
||||||
|
@@ -7070,7 +7068,9 @@ const struct powerpc_opcode vle_opcodes[ |
||||||
|
{"se_cmphl", SE_RR(3,3), SE_RR_MASK, PPCVLE, 0, {RX, RY}}, |
||||||
|
|
||||||
|
{"e_cmpi", SCI8BF(6,0,21), SCI8BF_MASK, PPCVLE, 0, {CRD32, RA, SCLSCI8}}, |
||||||
|
+{"e_cmpwi", SCI8BF(6,0,21), SCI8BF_MASK, PPCVLE, 0, {CRD32, RA, SCLSCI8}}, |
||||||
|
{"e_cmpli", SCI8BF(6,1,21), SCI8BF_MASK, PPCVLE, 0, {CRD32, RA, SCLSCI8}}, |
||||||
|
+{"e_cmplwi", SCI8BF(6,1,21), SCI8BF_MASK, PPCVLE, 0, {CRD32, RA, SCLSCI8}}, |
||||||
|
{"e_addi", SCI8(6,16), SCI8_MASK, PPCVLE, 0, {RT, RA, SCLSCI8}}, |
||||||
|
{"e_subi", SCI8(6,16), SCI8_MASK, PPCVLE, 0, {RT, RA, SCLSCI8N}}, |
||||||
|
{"e_addi.", SCI8(6,17), SCI8_MASK, PPCVLE, 0, {RT, RA, SCLSCI8}}, |
||||||
|
@@ -7097,6 +7097,16 @@ const struct powerpc_opcode vle_opcodes[ |
||||||
|
{"e_sthu", OPVUP(6,5), OPVUP_MASK, PPCVLE, 0, {RT, D8, RA0}}, |
||||||
|
{"e_stwu", OPVUP(6,6), OPVUP_MASK, PPCVLE, 0, {RT, D8, RA0}}, |
||||||
|
{"e_stmw", OPVUP(6,9), OPVUP_MASK, PPCVLE, 0, {RT, D8, RA0}}, |
||||||
|
+{"e_ldmvgprw", OPVUPRT(6,16,0),OPVUPRT_MASK, PPCVLE, 0, {D8, RA0}}, |
||||||
|
+{"e_stmvgprw", OPVUPRT(6,17,0),OPVUPRT_MASK, PPCVLE, 0, {D8, RA0}}, |
||||||
|
+{"e_ldmvsprw", OPVUPRT(6,16,1),OPVUPRT_MASK, PPCVLE, 0, {D8, RA0}}, |
||||||
|
+{"e_stmvsprw", OPVUPRT(6,17,1),OPVUPRT_MASK, PPCVLE, 0, {D8, RA0}}, |
||||||
|
+{"e_ldmvsrrw", OPVUPRT(6,16,4),OPVUPRT_MASK, PPCVLE, 0, {D8, RA0}}, |
||||||
|
+{"e_stmvsrrw", OPVUPRT(6,17,4),OPVUPRT_MASK, PPCVLE, 0, {D8, RA0}}, |
||||||
|
+{"e_ldmvcsrrw", OPVUPRT(6,16,5),OPVUPRT_MASK, PPCVLE, 0, {D8, RA0}}, |
||||||
|
+{"e_stmvcsrrw", OPVUPRT(6,17,5),OPVUPRT_MASK, PPCVLE, 0, {D8, RA0}}, |
||||||
|
+{"e_ldmvdsrrw", OPVUPRT(6,16,6),OPVUPRT_MASK, PPCVLE, 0, {D8, RA0}}, |
||||||
|
+{"e_stmvdsrrw", OPVUPRT(6,17,6),OPVUPRT_MASK, PPCVLE, 0, {D8, RA0}}, |
||||||
|
{"e_add16i", OP(7), OP_MASK, PPCVLE, 0, {RT, RA, SI}}, |
||||||
|
{"e_la", OP(7), OP_MASK, PPCVLE, 0, {RT, D, RA0}}, |
||||||
|
{"e_sub16i", OP(7), OP_MASK, PPCVLE, 0, {RT, RA, NSI}}, |
||||||
|
@@ -7144,10 +7154,8 @@ const struct powerpc_opcode vle_opcodes[ |
||||||
|
{"e_cmphl16i", IA16(28,23), IA16_MASK, PPCVLE, 0, {RA, VLEUIMM}}, |
||||||
|
{"e_cmph16i", IA16(28,22), IA16_MASK, PPCVLE, 0, {RA, VLESIMM}}, |
||||||
|
{"e_cmpl16i", I16A(28,21), I16A_MASK, PPCVLE, 0, {RA, VLEUIMM}}, |
||||||
|
-{"e_cmplwi", I16A(28,21), I16A_MASK, PPCVLE, 0, {RA, VLESIMM}}, |
||||||
|
{"e_mull2i", I16A(28,20), I16A_MASK, PPCVLE, 0, {RA, VLESIMM}}, |
||||||
|
{"e_cmp16i", IA16(28,19), IA16_MASK, PPCVLE, 0, {RA, VLESIMM}}, |
||||||
|
-{"e_cmpwi", IA16(28,19), IA16_MASK, PPCVLE, 0, {RA, VLESIMM}}, |
||||||
|
{"e_sub2is", I16A(28,18), I16A_MASK, PPCVLE, 0, {RA, VLENSIMM}}, |
||||||
|
{"e_add2is", I16A(28,18), I16A_MASK, PPCVLE, 0, {RA, VLESIMM}}, |
||||||
|
{"e_sub2i.", I16A(28,17), I16A_MASK, PPCVLE, 0, {RA, VLENSIMM}}, |
||||||
|
|
@ -0,0 +1,14 @@ |
|||||||
|
--- binutils.orig/bfd/elf64-ppc.c 2017-03-08 13:43:51.185482217 +0000 |
||||||
|
+++ binutils-2.27/bfd/elf64-ppc.c 2017-03-08 13:44:28.403034088 +0000 |
||||||
|
@@ -12514,7 +12514,10 @@ ppc64_elf_size_stubs (struct bfd_link_in |
||||||
|
stub_sec = stub_sec->next) |
||||||
|
if ((stub_sec->flags & SEC_LINKER_CREATED) == 0) |
||||||
|
{ |
||||||
|
- stub_sec->rawsize = stub_sec->size; |
||||||
|
+ if (htab->stub_iteration <= STUB_SHRINK_ITER |
||||||
|
+ || stub_sec->rawsize < stub_sec->size) |
||||||
|
+ /* Past STUB_SHRINK_ITER, rawsize is the max size seen. */ |
||||||
|
+ stub_sec->rawsize = stub_sec->size; |
||||||
|
stub_sec->size = 0; |
||||||
|
stub_sec->reloc_count = 0; |
||||||
|
stub_sec->flags &= ~SEC_RELOC; |
@ -0,0 +1,79 @@ |
|||||||
|
diff -rup binutils.orig/bfd/elf64-ppc.c binutils-2.27/bfd/elf64-ppc.c |
||||||
|
--- binutils.orig/bfd/elf64-ppc.c 2017-11-16 10:35:34.873666405 +0000 |
||||||
|
+++ binutils-2.27/bfd/elf64-ppc.c 2017-11-16 10:39:54.037530964 +0000 |
||||||
|
@@ -10105,6 +10105,10 @@ ppc64_elf_size_dynamic_sections (bfd *ou |
||||||
|
continue; |
||||||
|
} |
||||||
|
|
||||||
|
+ if (bfd_is_abs_section (s->output_section)) |
||||||
|
+ _bfd_error_handler (_("warning: discarding dynamic section %s"), |
||||||
|
+ s->name); |
||||||
|
+ |
||||||
|
if ((s->flags & SEC_HAS_CONTENTS) == 0) |
||||||
|
continue; |
||||||
|
|
||||||
|
@@ -10875,7 +10879,7 @@ ppc_build_one_stub (struct bfd_hash_entr |
||||||
|
+ htab->brlt->output_section->vma); |
||||||
|
|
||||||
|
off = (dest |
||||||
|
- - elf_gp (htab->brlt->output_section->owner) |
||||||
|
+ - elf_gp (info->output_bfd) |
||||||
|
- htab->sec_info[stub_entry->group->link_sec->id].toc_off); |
||||||
|
|
||||||
|
if (off + 0x80008000 > 0xffffffff || (off & 7) != 0) |
||||||
|
@@ -11025,7 +11029,7 @@ ppc_build_one_stub (struct bfd_hash_entr |
||||||
|
} |
||||||
|
|
||||||
|
off = (dest |
||||||
|
- - elf_gp (plt->output_section->owner) |
||||||
|
+ - elf_gp (info->output_bfd) |
||||||
|
- htab->sec_info[stub_entry->group->link_sec->id].toc_off); |
||||||
|
|
||||||
|
if (off + 0x80008000 > 0xffffffff || (off & 7) != 0) |
||||||
|
@@ -11172,7 +11176,7 @@ ppc_size_one_stub (struct bfd_hash_entry |
||||||
|
plt = htab->elf.iplt; |
||||||
|
off += (plt->output_offset |
||||||
|
+ plt->output_section->vma |
||||||
|
- - elf_gp (plt->output_section->owner) |
||||||
|
+ - elf_gp (info->output_bfd) |
||||||
|
- htab->sec_info[stub_entry->group->link_sec->id].toc_off); |
||||||
|
|
||||||
|
size = plt_stub_size (htab, stub_entry, off); |
||||||
|
@@ -11266,7 +11270,7 @@ ppc_size_one_stub (struct bfd_hash_entry |
||||||
|
off = (br_entry->offset |
||||||
|
+ htab->brlt->output_offset |
||||||
|
+ htab->brlt->output_section->vma |
||||||
|
- - elf_gp (htab->brlt->output_section->owner) |
||||||
|
+ - elf_gp (info->output_bfd) |
||||||
|
- htab->sec_info[stub_entry->group->link_sec->id].toc_off); |
||||||
|
|
||||||
|
if (info->emitrelocations) |
||||||
|
@@ -11386,7 +11390,7 @@ ppc64_elf_next_toc_section (struct bfd_l |
||||||
|
output toc base plus 0x8000. Making the input elf_gp an |
||||||
|
offset allows us to move the toc as a whole without |
||||||
|
recalculating input elf_gp. */ |
||||||
|
- off = htab->toc_curr - elf_gp (isec->output_section->owner); |
||||||
|
+ off = htab->toc_curr - elf_gp (info->output_bfd); |
||||||
|
off += TOC_BASE_OFF; |
||||||
|
|
||||||
|
/* Die if someone uses a linker script that doesn't keep input |
||||||
|
@@ -11415,7 +11419,7 @@ ppc64_elf_next_toc_section (struct bfd_l |
||||||
|
} |
||||||
|
addr = (htab->toc_first_sec->output_offset |
||||||
|
+ htab->toc_first_sec->output_section->vma); |
||||||
|
- off = addr - elf_gp (isec->output_section->owner) + TOC_BASE_OFF; |
||||||
|
+ off = addr - elf_gp (info->output_bfd) + TOC_BASE_OFF; |
||||||
|
elf_gp (isec->owner) = off; |
||||||
|
|
||||||
|
return TRUE; |
||||||
|
diff -rup binutils.orig/ld/testsuite/ld-elf/note-3.t binutils-2.27/ld/testsuite/ld-elf/note-3.t |
||||||
|
--- binutils.orig/ld/testsuite/ld-elf/note-3.t 2017-11-16 10:35:35.670656893 +0000 |
||||||
|
+++ binutils-2.27/ld/testsuite/ld-elf/note-3.t 2017-11-16 10:59:06.352286215 +0000 |
||||||
|
@@ -17,6 +17,7 @@ SECTIONS |
||||||
|
|
||||||
|
.dynstr : { *(.dynstr) } |
||||||
|
.dynsym : { *(.dynsym) } |
||||||
|
+ .got : { *(.got .toc) *(.igot) } |
||||||
|
.got.plt : { *(.got.plt) *(.igot.plt) } |
||||||
|
/DISCARD/ : { *(*) } |
||||||
|
} |
@ -0,0 +1,41 @@ |
|||||||
|
--- binutils.orig/bfd/dwarf2.c 2017-08-08 17:40:39.084385407 +0100 |
||||||
|
+++ binutils-2.27/bfd/dwarf2.c 2017-08-08 17:41:34.237754733 +0100 |
||||||
|
@@ -215,9 +215,6 @@ struct comp_unit |
||||||
|
/* Linked list of the low and high address ranges contained in this |
||||||
|
compilation unit as specified in the compilation unit header. */ |
||||||
|
struct arange arange; |
||||||
|
- /* A single arange containing the lowest and highest |
||||||
|
- addresses covered by the compilation unit. */ |
||||||
|
- struct arange minmax; |
||||||
|
|
||||||
|
/* The DW_AT_name attribute (for error messages). */ |
||||||
|
char *name; |
||||||
|
@@ -1540,16 +1537,11 @@ arange_add (struct comp_unit *unit, stru |
||||||
|
/* If the first arange is empty, use it. */ |
||||||
|
if (first_arange->high == 0) |
||||||
|
{ |
||||||
|
- unit->minmax.low = first_arange->low = low_pc; |
||||||
|
- unit->minmax.high = first_arange->high = high_pc; |
||||||
|
+ first_arange->low = low_pc; |
||||||
|
+ first_arange->high = high_pc; |
||||||
|
return TRUE; |
||||||
|
} |
||||||
|
|
||||||
|
- if (unit->minmax.low > low_pc) |
||||||
|
- unit->minmax.low = low_pc; |
||||||
|
- if (unit->minmax.high < high_pc) |
||||||
|
- unit->minmax.high = high_pc; |
||||||
|
- |
||||||
|
/* Next see if we can cheaply extend an existing range. */ |
||||||
|
arange = first_arange; |
||||||
|
do |
||||||
|
@@ -3151,9 +3143,6 @@ comp_unit_contains_address (struct comp_ |
||||||
|
if (unit->error) |
||||||
|
return FALSE; |
||||||
|
|
||||||
|
- if (unit->minmax.high < addr || unit->minmax.low > addr) |
||||||
|
- return FALSE; |
||||||
|
- |
||||||
|
/* We know that the address *might* be contained within this comp |
||||||
|
unit, but we cannot be sure until we check the specific ranges. */ |
||||||
|
arange = &unit->arange; |
@ -0,0 +1,24 @@ |
|||||||
|
diff -rup binutils.orig/ld/testsuite/ld-ifunc/ifunc.exp binutils-2.27/ld/testsuite/ld-ifunc/ifunc.exp |
||||||
|
--- binutils.orig/ld/testsuite/ld-ifunc/ifunc.exp 2017-02-21 16:23:38.051305028 +0000 |
||||||
|
+++ binutils-2.27/ld/testsuite/ld-ifunc/ifunc.exp 2017-02-21 16:59:09.769220809 +0000 |
||||||
|
@@ -563,20 +563,4 @@ run_ld_link_exec_tests [] [list \ |
||||||
|
"pr18841c" \ |
||||||
|
"pr18841.out" \ |
||||||
|
] \ |
||||||
|
- [list \ |
||||||
|
- "Run pr19784a" \ |
||||||
|
- "tmpdir/pr19784a.o tmpdir/libpr19784a.so" \ |
||||||
|
- "" \ |
||||||
|
- { dummy.c } \ |
||||||
|
- "pr19784a" \ |
||||||
|
- "pass.out" \ |
||||||
|
- ] \ |
||||||
|
- [list \ |
||||||
|
- "Run pr19784b" \ |
||||||
|
- "--as-needed tmpdir/pr19784a.o tmpdir/libpr19784b.so" \ |
||||||
|
- "" \ |
||||||
|
- { dummy.c } \ |
||||||
|
- "pr19784b" \ |
||||||
|
- "pass.out" \ |
||||||
|
- ] \ |
||||||
|
] |
@ -0,0 +1,76 @@ |
|||||||
|
diff -rup binutils.orig/bfd/elf32-i386.c binutils-2.27/bfd/elf32-i386.c |
||||||
|
--- binutils.orig/bfd/elf32-i386.c 2017-05-17 11:22:32.393303573 +0100 |
||||||
|
+++ binutils-2.27/bfd/elf32-i386.c 2017-05-17 11:25:33.097138811 +0100 |
||||||
|
@@ -2322,8 +2322,7 @@ do_size: |
||||||
|
if (use_plt_got |
||||||
|
&& h != NULL |
||||||
|
&& h->plt.refcount > 0 |
||||||
|
- && (((info->flags & DF_BIND_NOW) && !h->pointer_equality_needed) |
||||||
|
- || h->got.refcount > 0) |
||||||
|
+ && h->got.refcount > 0 |
||||||
|
&& htab->plt_got == NULL) |
||||||
|
{ |
||||||
|
/* Create the GOT procedure linkage table. */ |
||||||
|
@@ -2672,16 +2671,6 @@ elf_i386_allocate_dynrelocs (struct elf_ |
||||||
|
if PLT is used. */ |
||||||
|
eh->func_pointer_refcount = 0; |
||||||
|
|
||||||
|
- if ((info->flags & DF_BIND_NOW) && !h->pointer_equality_needed) |
||||||
|
- { |
||||||
|
- /* Don't use the regular PLT for DF_BIND_NOW. */ |
||||||
|
- h->plt.offset = (bfd_vma) -1; |
||||||
|
- |
||||||
|
- /* Use the GOT PLT. */ |
||||||
|
- h->got.refcount = 1; |
||||||
|
- eh->plt_got.refcount = 1; |
||||||
|
- } |
||||||
|
- |
||||||
|
use_plt_got = eh->plt_got.refcount > 0; |
||||||
|
|
||||||
|
/* Make sure this symbol is output as a dynamic symbol. |
||||||
|
diff -rup binutils.orig/bfd/elf64-x86-64.c binutils-2.27/bfd/elf64-x86-64.c |
||||||
|
--- binutils.orig/bfd/elf64-x86-64.c 2017-05-17 11:22:32.396303537 +0100 |
||||||
|
+++ binutils-2.27/bfd/elf64-x86-64.c 2017-05-17 11:26:00.250813521 +0100 |
||||||
|
@@ -2722,8 +2722,7 @@ do_size: |
||||||
|
if (use_plt_got |
||||||
|
&& h != NULL |
||||||
|
&& h->plt.refcount > 0 |
||||||
|
- && (((info->flags & DF_BIND_NOW) && !h->pointer_equality_needed) |
||||||
|
- || h->got.refcount > 0) |
||||||
|
+ && h->got.refcount > 0 |
||||||
|
&& htab->plt_got == NULL) |
||||||
|
{ |
||||||
|
/* Create the GOT procedure linkage table. */ |
||||||
|
@@ -3094,16 +3093,6 @@ elf_x86_64_allocate_dynrelocs (struct el |
||||||
|
if PLT is used. */ |
||||||
|
eh->func_pointer_refcount = 0; |
||||||
|
|
||||||
|
- if ((info->flags & DF_BIND_NOW) && !h->pointer_equality_needed) |
||||||
|
- { |
||||||
|
- /* Don't use the regular PLT for DF_BIND_NOW. */ |
||||||
|
- h->plt.offset = (bfd_vma) -1; |
||||||
|
- |
||||||
|
- /* Use the GOT PLT. */ |
||||||
|
- h->got.refcount = 1; |
||||||
|
- eh->plt_got.refcount = 1; |
||||||
|
- } |
||||||
|
- |
||||||
|
use_plt_got = eh->plt_got.refcount > 0; |
||||||
|
|
||||||
|
/* Make sure this symbol is output as a dynamic symbol. |
||||||
|
diff -rup binutils.orig/ld/testsuite/ld-i386/pr17689now.rd binutils-2.27/ld/testsuite/ld-i386/pr17689now.rd |
||||||
|
--- binutils.orig/ld/testsuite/ld-i386/pr17689now.rd 2017-05-17 11:22:32.677300171 +0100 |
||||||
|
+++ binutils-2.27/ld/testsuite/ld-i386/pr17689now.rd 2017-05-17 11:39:36.097021963 +0100 |
||||||
|
@@ -1,4 +1,3 @@ |
||||||
|
-#failif |
||||||
|
#... |
||||||
|
[0-9a-f ]+R_386_JUMP_SLOT +0+.* |
||||||
|
#... |
||||||
|
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr17689now.rd binutils-2.27/ld/testsuite/ld-x86-64/pr17689now.rd |
||||||
|
--- binutils.orig/ld/testsuite/ld-x86-64/pr17689now.rd 2017-05-17 11:22:32.734299489 +0100 |
||||||
|
+++ binutils-2.27/ld/testsuite/ld-x86-64/pr17689now.rd 2017-05-17 11:39:53.071818174 +0100 |
||||||
|
@@ -1,4 +1,3 @@ |
||||||
|
-#failif |
||||||
|
#... |
||||||
|
[0-9a-f ]+R_X86_64_JUMP_SLOT +0+ +.* |
||||||
|
#... |
@ -0,0 +1,354 @@ |
|||||||
|
diff -rup binutils.orig/bfd/elf64-s390.c binutils-2.27/bfd/elf64-s390.c |
||||||
|
--- binutils.orig/bfd/elf64-s390.c 2017-08-29 13:09:44.135143399 +0100 |
||||||
|
+++ binutils-2.27/bfd/elf64-s390.c 2017-08-29 13:10:37.272554164 +0100 |
||||||
|
@@ -25,6 +25,7 @@ |
||||||
|
#include "libbfd.h" |
||||||
|
#include "elf-bfd.h" |
||||||
|
#include "elf/s390.h" |
||||||
|
+#include "elf-s390.h" |
||||||
|
|
||||||
|
/* In case we're on a 32-bit machine, construct a 64-bit "-1" value |
||||||
|
from smaller values. Start with zero, widen, *then* decrement. */ |
||||||
|
@@ -660,6 +661,9 @@ struct elf_s390_link_hash_table |
||||||
|
|
||||||
|
/* Small local sym cache. */ |
||||||
|
struct sym_cache sym_cache; |
||||||
|
+ |
||||||
|
+ /* Options passed from the linker. */ |
||||||
|
+ struct s390_elf_params *params; |
||||||
|
}; |
||||||
|
|
||||||
|
/* Get the s390 ELF linker hash table from a link_info structure. */ |
||||||
|
@@ -3883,6 +3887,70 @@ elf64_s390_merge_private_bfd_data (bfd * |
||||||
|
return TRUE; |
||||||
|
} |
||||||
|
|
||||||
|
+/* We may add a PT_S390_PGSTE program header. */ |
||||||
|
+ |
||||||
|
+static int |
||||||
|
+elf_s390_additional_program_headers (bfd *abfd ATTRIBUTE_UNUSED, |
||||||
|
+ struct bfd_link_info *info) |
||||||
|
+{ |
||||||
|
+ struct elf_s390_link_hash_table *htab; |
||||||
|
+ |
||||||
|
+ htab = elf_s390_hash_table (info); |
||||||
|
+ return htab->params->pgste; |
||||||
|
+} |
||||||
|
+ |
||||||
|
+ |
||||||
|
+/* Add the PT_S390_PGSTE program header. */ |
||||||
|
+ |
||||||
|
+static bfd_boolean |
||||||
|
+elf_s390_modify_segment_map (bfd *abfd ATTRIBUTE_UNUSED, |
||||||
|
+ struct bfd_link_info *info) |
||||||
|
+{ |
||||||
|
+ struct elf_s390_link_hash_table *htab; |
||||||
|
+ struct elf_segment_map *m, *pm = NULL; |
||||||
|
+ |
||||||
|
+ htab = elf_s390_hash_table (info); |
||||||
|
+ if (!htab->params->pgste) |
||||||
|
+ return TRUE; |
||||||
|
+ |
||||||
|
+ /* If there is already a PT_S390_PGSTE header, avoid adding |
||||||
|
+ another. */ |
||||||
|
+ m = elf_seg_map (abfd); |
||||||
|
+ while (m && m->p_type != PT_S390_PGSTE) |
||||||
|
+ { |
||||||
|
+ pm = m; |
||||||
|
+ m = m->next; |
||||||
|
+ } |
||||||
|
+ |
||||||
|
+ if (m) |
||||||
|
+ return TRUE; |
||||||
|
+ |
||||||
|
+ m = (struct elf_segment_map *) |
||||||
|
+ bfd_zalloc (abfd, sizeof (struct elf_segment_map)); |
||||||
|
+ if (m == NULL) |
||||||
|
+ return FALSE; |
||||||
|
+ m->p_type = PT_S390_PGSTE; |
||||||
|
+ m->count = 0; |
||||||
|
+ m->next = NULL; |
||||||
|
+ if (pm) |
||||||
|
+ pm->next = m; |
||||||
|
+ |
||||||
|
+ return TRUE; |
||||||
|
+} |
||||||
|
+ |
||||||
|
+bfd_boolean |
||||||
|
+bfd_elf_s390_set_options (struct bfd_link_info *info, |
||||||
|
+ struct s390_elf_params *params) |
||||||
|
+{ |
||||||
|
+ struct elf_s390_link_hash_table *htab; |
||||||
|
+ |
||||||
|
+ htab = elf_s390_hash_table (info); |
||||||
|
+ htab->params = params; |
||||||
|
+ |
||||||
|
+ return TRUE; |
||||||
|
+} |
||||||
|
+ |
||||||
|
+ |
||||||
|
/* Why was the hash table entry size definition changed from |
||||||
|
ARCH_SIZE/8 to 4? This breaks the 64 bit dynamic linker and |
||||||
|
this is the only reason for the s390_elf64_size_info structure. */ |
||||||
|
@@ -3959,6 +4027,8 @@ const struct elf_size_info s390_elf64_si |
||||||
|
#define elf_backend_plt_sym_val elf_s390_plt_sym_val |
||||||
|
#define elf_backend_add_symbol_hook elf_s390_add_symbol_hook |
||||||
|
#define elf_backend_sort_relocs_p elf_s390_elf_sort_relocs_p |
||||||
|
+#define elf_backend_additional_program_headers elf_s390_additional_program_headers |
||||||
|
+#define elf_backend_modify_segment_map elf_s390_modify_segment_map |
||||||
|
|
||||||
|
#define bfd_elf64_mkobject elf_s390_mkobject |
||||||
|
#define elf_backend_object_p elf_s390_object_p |
||||||
|
diff -rup binutils.orig/binutils/readelf.c binutils-2.27/binutils/readelf.c |
||||||
|
--- binutils.orig/binutils/readelf.c 2017-08-29 13:09:44.138143366 +0100 |
||||||
|
+++ binutils-2.27/binutils/readelf.c 2017-08-29 13:09:53.384040839 +0100 |
||||||
|
@@ -3610,6 +3610,16 @@ get_arm_segment_type (unsigned long type |
||||||
|
} |
||||||
|
|
||||||
|
static const char * |
||||||
|
+get_s390_segment_type (unsigned long type) |
||||||
|
+{ |
||||||
|
+ switch (type) |
||||||
|
+ { |
||||||
|
+ case PT_S390_PGSTE: return "S390_PGSTE"; |
||||||
|
+ default: return NULL; |
||||||
|
+ } |
||||||
|
+} |
||||||
|
+ |
||||||
|
+static const char * |
||||||
|
get_mips_segment_type (unsigned long type) |
||||||
|
{ |
||||||
|
switch (type) |
||||||
|
@@ -3755,6 +3765,10 @@ get_segment_type (unsigned long p_type) |
||||||
|
case EM_TI_C6000: |
||||||
|
result = get_tic6x_segment_type (p_type); |
||||||
|
break; |
||||||
|
+ case EM_S390: |
||||||
|
+ case EM_S390_OLD: |
||||||
|
+ result = get_s390_segment_type (p_type); |
||||||
|
+ break; |
||||||
|
default: |
||||||
|
result = NULL; |
||||||
|
break; |
||||||
|
diff -rup binutils.orig/elfcpp/elfcpp.h binutils-2.27/elfcpp/elfcpp.h |
||||||
|
--- binutils.orig/elfcpp/elfcpp.h 2017-08-29 13:09:44.182142878 +0100 |
||||||
|
+++ binutils-2.27/elfcpp/elfcpp.h 2017-08-29 13:09:53.385040828 +0100 |
||||||
|
@@ -514,7 +514,9 @@ enum PT |
||||||
|
// Platform architecture compatibility information |
||||||
|
PT_AARCH64_ARCHEXT = 0x70000000, |
||||||
|
// Exception unwind tables |
||||||
|
- PT_AARCH64_UNWIND = 0x70000001 |
||||||
|
+ PT_AARCH64_UNWIND = 0x70000001, |
||||||
|
+ // 4k page table size |
||||||
|
+ PT_S390_PGSTE = 0x70000000, |
||||||
|
}; |
||||||
|
|
||||||
|
// The valid bit flags found in the Phdr p_flags field. |
||||||
|
diff -rup binutils.orig/include/elf/s390.h binutils-2.27/include/elf/s390.h |
||||||
|
--- binutils.orig/include/elf/s390.h 2017-08-29 13:09:44.434140083 +0100 |
||||||
|
+++ binutils-2.27/include/elf/s390.h 2017-08-29 13:09:53.385040828 +0100 |
||||||
|
@@ -37,6 +37,9 @@ |
||||||
|
|
||||||
|
#define EF_S390_HIGH_GPRS 0x00000001 |
||||||
|
|
||||||
|
+/* Request 4k page table size. */ |
||||||
|
+#define PT_S390_PGSTE (PT_LOPROC + 0) |
||||||
|
+ |
||||||
|
/* Relocation types. */ |
||||||
|
|
||||||
|
START_RELOC_NUMBERS (elf_s390_reloc_type) |
||||||
|
diff -rup binutils.orig/ld/emulparams/elf64_s390.sh binutils-2.27/ld/emulparams/elf64_s390.sh |
||||||
|
--- binutils.orig/ld/emulparams/elf64_s390.sh 2017-08-29 13:09:44.441140006 +0100 |
||||||
|
+++ binutils-2.27/ld/emulparams/elf64_s390.sh 2017-08-29 13:09:53.385040828 +0100 |
||||||
|
@@ -12,6 +12,7 @@ TEMPLATE_NAME=elf32 |
||||||
|
GENERATE_SHLIB_SCRIPT=yes |
||||||
|
GENERATE_PIE_SCRIPT=yes |
||||||
|
NO_SMALL_DATA=yes |
||||||
|
+EXTRA_EM_FILE=s390 |
||||||
|
IREL_IN_PLT= |
||||||
|
|
||||||
|
# Treat a host that matches the target with the possible exception of "x" |
||||||
|
diff -rup binutils.orig/ld/gen-doc.texi binutils-2.27/ld/gen-doc.texi |
||||||
|
--- binutils.orig/ld/gen-doc.texi 2017-08-29 13:09:44.445139961 +0100 |
||||||
|
+++ binutils-2.27/ld/gen-doc.texi 2017-08-29 13:09:53.385040828 +0100 |
||||||
|
@@ -21,6 +21,7 @@ |
||||||
|
@set POWERPC |
||||||
|
@set POWERPC64 |
||||||
|
@set Renesas |
||||||
|
+@set S/390 |
||||||
|
@set SPU |
||||||
|
@set TICOFF |
||||||
|
@set WIN32 |
||||||
|
diff -rup binutils.orig/ld/ld.texinfo binutils-2.27/ld/ld.texinfo |
||||||
|
--- binutils.orig/ld/ld.texinfo 2017-08-29 13:09:44.445139961 +0100 |
||||||
|
+++ binutils-2.27/ld/ld.texinfo 2017-08-29 13:09:53.385040828 +0100 |
||||||
|
@@ -34,6 +34,7 @@ |
||||||
|
@set POWERPC |
||||||
|
@set POWERPC64 |
||||||
|
@set Renesas |
||||||
|
+@set S/390 |
||||||
|
@set SPU |
||||||
|
@set TICOFF |
||||||
|
@set WIN32 |
||||||
|
@@ -158,6 +159,9 @@ in the section entitled ``GNU Free Docum |
||||||
|
@ifset POWERPC64 |
||||||
|
* PowerPC64 ELF64:: ld and PowerPC64 64-bit ELF Support |
||||||
|
@end ifset |
||||||
|
+@ifset S/390 |
||||||
|
+* S/390 ELF:: ld and S/390 ELF Support |
||||||
|
+@end ifset |
||||||
|
@ifset SPU |
||||||
|
* SPU ELF:: ld and SPU ELF Support |
||||||
|
@end ifset |
||||||
|
@@ -6380,6 +6384,9 @@ functionality are not listed. |
||||||
|
@ifset POWERPC64 |
||||||
|
* PowerPC64 ELF64:: @command{ld} and PowerPC64 64-bit ELF Support |
||||||
|
@end ifset |
||||||
|
+@ifset S/390 |
||||||
|
+* S/390 ELF:: @command{ld} and S/390 ELF Support |
||||||
|
+@end ifset |
||||||
|
@ifset SPU |
||||||
|
* SPU ELF:: @command{ld} and SPU ELF Support |
||||||
|
@end ifset |
||||||
|
@@ -7373,6 +7380,30 @@ default behaviour. |
||||||
|
@end table |
||||||
|
|
||||||
|
@ifclear GENERIC |
||||||
|
+@lowersections |
||||||
|
+@end ifclear |
||||||
|
+@end ifset |
||||||
|
+ |
||||||
|
+@ifset S/390 |
||||||
|
+@ifclear GENERIC |
||||||
|
+@raisesections |
||||||
|
+@end ifclear |
||||||
|
+ |
||||||
|
+@node S/390 ELF |
||||||
|
+@section @command{ld} and S/390 ELF Support |
||||||
|
+ |
||||||
|
+@cindex S/390 ELF options |
||||||
|
+@table @option |
||||||
|
+ |
||||||
|
+@cindex S/390 |
||||||
|
+@kindex --s390-pgste |
||||||
|
+@item --s390-pgste |
||||||
|
+This option marks the result file with a @code{PT_S390_PGSTE} |
||||||
|
+segment. The Linux kernel is supposed to allocate 4k page tables for |
||||||
|
+binaries marked that way. |
||||||
|
+@end table |
||||||
|
+ |
||||||
|
+@ifclear GENERIC |
||||||
|
@lowersections |
||||||
|
@end ifclear |
||||||
|
@end ifset |
||||||
|
diff -rup binutils.orig/ld/Makefile.in binutils-2.27/ld/Makefile.in |
||||||
|
--- binutils.orig/ld/Makefile.in 2017-08-29 13:09:44.446139950 +0100 |
||||||
|
+++ binutils-2.27/ld/Makefile.in 2017-08-29 13:09:53.385040828 +0100 |
||||||
|
@@ -3490,6 +3490,7 @@ eelf64_ia64_vms.c: $(srcdir)/emulparams/ |
||||||
|
$(srcdir)/scripttempl/ia64vms.sc ${GEN_DEPENDS} |
||||||
|
|
||||||
|
eelf64_s390.c: $(srcdir)/emulparams/elf64_s390.sh \ |
||||||
|
+ $(srcdir)/emultempl/s390.em \ |
||||||
|
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} |
||||||
|
|
||||||
|
eelf64_sparc.c: $(srcdir)/emulparams/elf64_sparc.sh \ |
||||||
|
|
||||||
|
--- /dev/null 2017-08-29 08:03:33.387685165 +0100 |
||||||
|
+++ binutils-2.27/bfd/elf-s390.h 2017-08-29 13:19:31.705627899 +0100 |
||||||
|
@@ -0,0 +1,29 @@ |
||||||
|
+/* S/390-specific support for ELF. |
||||||
|
+ Copyright (C) 2017 Free Software Foundation, Inc. |
||||||
|
+ |
||||||
|
+ This file is part of BFD, the Binary File Descriptor library. |
||||||
|
+ |
||||||
|
+ This program is free software; you can redistribute it and/or modify |
||||||
|
+ it under the terms of the GNU General Public License as published by |
||||||
|
+ the Free Software Foundation; either version 3 of the License, or |
||||||
|
+ (at your option) any later version. |
||||||
|
+ |
||||||
|
+ This program is distributed in the hope that it will be useful, |
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||||
|
+ GNU General Public License for more details. |
||||||
|
+ |
||||||
|
+ You should have received a copy of the GNU General Public License |
||||||
|
+ along with this program; if not, write to the Free Software |
||||||
|
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, |
||||||
|
+ MA 02110-1301, USA. */ |
||||||
|
+ |
||||||
|
+/* Used to pass info between ld and bfd. */ |
||||||
|
+struct s390_elf_params |
||||||
|
+{ |
||||||
|
+ /* Tell the kernel to allocate 4k page tables. */ |
||||||
|
+ int pgste; |
||||||
|
+}; |
||||||
|
+ |
||||||
|
+bfd_boolean bfd_elf_s390_set_options (struct bfd_link_info *info, |
||||||
|
+ struct s390_elf_params *params); |
||||||
|
--- /dev/null 2017-08-29 08:03:33.387685165 +0100 |
||||||
|
+++ binutils-2.27/ld/emultempl/s390.em 2017-08-29 13:26:01.797302217 +0100 |
||||||
|
@@ -0,0 +1,64 @@ |
||||||
|
+# This shell script emits a C file. -*- C -*- |
||||||
|
+# Copyright (C) 2017 Free Software Foundation, Inc. |
||||||
|
+# |
||||||
|
+# This file is part of the GNU Binutils. |
||||||
|
+# |
||||||
|
+# This program is free software; you can redistribute it and/or modify |
||||||
|
+# it under the terms of the GNU General Public License as published by |
||||||
|
+# the Free Software Foundation; either version 3 of the license, or |
||||||
|
+# (at your option) any later version. |
||||||
|
+# |
||||||
|
+# This program is distributed in the hope that it will be useful, |
||||||
|
+# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||||
|
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||||
|
+# GNU General Public License for more details. |
||||||
|
+# |
||||||
|
+# You should have received a copy of the GNU General Public License |
||||||
|
+# along with this program; see the file COPYING3. If not, |
||||||
|
+# see <http://www.gnu.org/licenses/>. |
||||||
|
+# |
||||||
|
+ |
||||||
|
+# This file is sourced from elf-generic.em, and defines S/390 |
||||||
|
+# specific routines. |
||||||
|
+# |
||||||
|
+fragment <<EOF |
||||||
|
+ |
||||||
|
+#include "ldctor.h" |
||||||
|
+#include "elf-s390.h" |
||||||
|
+ |
||||||
|
+static struct s390_elf_params params = { 0 }; |
||||||
|
+ |
||||||
|
+/* This is a convenient point to tell BFD about target specific flags. |
||||||
|
+ After the output has been created, but before inputs are read. */ |
||||||
|
+static void |
||||||
|
+s390_elf_create_output_section_statements (void) |
||||||
|
+{ |
||||||
|
+ if (!bfd_elf_s390_set_options (&link_info, ¶ms)) |
||||||
|
+ einfo ("%F%P: can not init BFD: %E\n"); |
||||||
|
+} |
||||||
|
+ |
||||||
|
+EOF |
||||||
|
+ |
||||||
|
+# Define some shell vars to insert bits of code into the standard elf |
||||||
|
+# parse_args and list_options functions. |
||||||
|
+# |
||||||
|
+PARSE_AND_LIST_PROLOGUE=' |
||||||
|
+#define OPTION_PGSTE 301 |
||||||
|
+' |
||||||
|
+ |
||||||
|
+PARSE_AND_LIST_LONGOPTS=' |
||||||
|
+ { "s390-pgste", no_argument, NULL, OPTION_PGSTE}, |
||||||
|
+' |
||||||
|
+ |
||||||
|
+PARSE_AND_LIST_OPTIONS=' |
||||||
|
+ fprintf (file, _(" --s390-pgste Tell the kernel to " |
||||||
|
+ "allocate 4k page tables\n")); |
||||||
|
+' |
||||||
|
+ |
||||||
|
+PARSE_AND_LIST_ARGS_CASES=' |
||||||
|
+ case OPTION_PGSTE: |
||||||
|
+ params.pgste = 1; |
||||||
|
+ break; |
||||||
|
+' |
||||||
|
+ |
||||||
|
+LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS=s390_elf_create_output_section_statements |
@ -0,0 +1,44 @@ |
|||||||
|
diff -rup binutils.orig/bfd/elf32-s390.c binutils-2.27/bfd/elf32-s390.c |
||||||
|
--- binutils.orig/bfd/elf32-s390.c 2017-05-12 13:00:01.697650210 +0100 |
||||||
|
+++ binutils-2.27/bfd/elf32-s390.c 2017-05-12 13:01:05.223988744 +0100 |
||||||
|
@@ -2809,7 +2809,7 @@ elf_s390_relocate_section (bfd *output_b |
||||||
|
&& s390_is_ifunc_symbol_p (h) |
||||||
|
&& h->def_regular) |
||||||
|
{ |
||||||
|
- if (!bfd_link_pic (info) || !h->non_got_ref) |
||||||
|
+ if (!bfd_link_pic (info)) |
||||||
|
{ |
||||||
|
/* For a non-shared object STT_GNU_IFUNC symbol must |
||||||
|
go through PLT. */ |
||||||
|
diff -rup binutils.orig/bfd/elf64-s390.c binutils-2.27/bfd/elf64-s390.c |
||||||
|
--- binutils.orig/bfd/elf64-s390.c 2017-05-12 13:00:01.699650190 +0100 |
||||||
|
+++ binutils-2.27/bfd/elf64-s390.c 2017-05-12 13:01:31.017720167 +0100 |
||||||
|
@@ -2768,10 +2768,11 @@ elf_s390_relocate_section (bfd *output_b |
||||||
|
&& s390_is_ifunc_symbol_p (h) |
||||||
|
&& h->def_regular) |
||||||
|
{ |
||||||
|
- if (!bfd_link_pic (info) || !h->non_got_ref) |
||||||
|
+ if (!bfd_link_pic (info)) |
||||||
|
{ |
||||||
|
- /* For a non-shared object STT_GNU_IFUNC symbol must |
||||||
|
- go through PLT. */ |
||||||
|
+ /* For a non-shared object the symbol will not |
||||||
|
+ change. Hence we can write the address of the |
||||||
|
+ target IPLT slot now. */ |
||||||
|
relocation = (htab->elf.iplt->output_section->vma |
||||||
|
+ htab->elf.iplt->output_offset |
||||||
|
+ h ->plt.offset); |
||||||
|
diff -rup binutils.orig/bfd/elf-s390-common.c binutils-2.27/bfd/elf-s390-common.c |
||||||
|
--- binutils.orig/bfd/elf-s390-common.c 2017-05-12 13:00:01.695650231 +0100 |
||||||
|
+++ binutils-2.27/bfd/elf-s390-common.c 2017-05-12 13:01:54.347477247 +0100 |
||||||
|
@@ -161,9 +161,7 @@ keep: |
||||||
|
h->type = STT_FUNC; |
||||||
|
} |
||||||
|
|
||||||
|
- /* We need dynamic relocation for STT_GNU_IFUNC symbol only when |
||||||
|
- there is a non-GOT reference in a shared object. */ |
||||||
|
- if (!bfd_link_pic (info) || !h->non_got_ref) |
||||||
|
+ if (!bfd_link_pic (info)) |
||||||
|
*head = NULL; |
||||||
|
|
||||||
|
/* Finally, allocate space. */ |
@ -0,0 +1,10 @@ |
|||||||
|
diff -rup binutils.orig/ld/testsuite/ld-elf/shared.exp binutils-2.27/ld/testsuite/ld-elf/shared.exp |
||||||
|
--- binutils.orig/ld/testsuite/ld-elf/shared.exp 2017-02-21 15:00:21.788036974 +0000 |
||||||
|
+++ binutils-2.27/ld/testsuite/ld-elf/shared.exp 2017-02-21 16:18:12.497641235 +0000 |
||||||
|
@@ -665,5 +665,5 @@ proc mix_pic_and_non_pic {xfails cflags |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
-mix_pic_and_non_pic [list "arm*-*-*" "aarch64*-*-*"] "" "" "pr19719" |
||||||
|
+mix_pic_and_non_pic [list "arm*-*-*" "aarch64*-*-*" "s390*-*-*"] "" "" "pr19719" |
||||||
|
mix_pic_and_non_pic [] "-fPIE" "-pie" "pr19719pie" |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,43 @@ |
|||||||
|
--- binutils.orig/bfd/elf64-s390.c 2017-09-06 09:03:23.142216202 +0100 |
||||||
|
+++ binutils-2.27/bfd/elf64-s390.c 2017-09-06 09:11:05.209080947 +0100 |
||||||
|
@@ -3895,8 +3895,13 @@ elf_s390_additional_program_headers (bfd |
||||||
|
{ |
||||||
|
struct elf_s390_link_hash_table *htab; |
||||||
|
|
||||||
|
- htab = elf_s390_hash_table (info); |
||||||
|
- return htab->params->pgste; |
||||||
|
+ if (info) |
||||||
|
+ { |
||||||
|
+ htab = elf_s390_hash_table (info); |
||||||
|
+ if (htab) |
||||||
|
+ return htab->params->pgste; |
||||||
|
+ } |
||||||
|
+ return 0; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
@@ -3909,6 +3914,9 @@ elf_s390_modify_segment_map (bfd *abfd A |
||||||
|
struct elf_s390_link_hash_table *htab; |
||||||
|
struct elf_segment_map *m, *pm = NULL; |
||||||
|
|
||||||
|
+ if (!abfd || !info) |
||||||
|
+ return TRUE; |
||||||
|
+ |
||||||
|
htab = elf_s390_hash_table (info); |
||||||
|
if (!htab->params->pgste) |
||||||
|
return TRUE; |
||||||
|
@@ -3944,8 +3952,12 @@ bfd_elf_s390_set_options (struct bfd_lin |
||||||
|
{ |
||||||
|
struct elf_s390_link_hash_table *htab; |
||||||
|
|
||||||
|
- htab = elf_s390_hash_table (info); |
||||||
|
- htab->params = params; |
||||||
|
+ if (info) |
||||||
|
+ { |
||||||
|
+ htab = elf_s390_hash_table (info); |
||||||
|
+ if (htab) |
||||||
|
+ htab->params = params; |
||||||
|
+ } |
||||||
|
|
||||||
|
return TRUE; |
||||||
|
} |
@ -0,0 +1,22 @@ |
|||||||
|
--- binutils.orig/bfd/elf64-s390.c 2017-08-11 11:09:23.264667227 +0000 |
||||||
|
+++ binutils-2.27/bfd/elf64-s390.c 2017-08-11 11:15:07.510029088 +0000 |
||||||
|
@@ -2745,6 +2745,19 @@ elf_s390_relocate_section (bfd *output_b |
||||||
|
case R_390_PC32: |
||||||
|
case R_390_PC32DBL: |
||||||
|
case R_390_PC64: |
||||||
|
+ if (h != NULL |
||||||
|
+ && bfd_link_pie (info) |
||||||
|
+ && !h->def_regular) |
||||||
|
+ { |
||||||
|
+ _bfd_error_handler (_("%B: `%s' non-PLT reloc for symbol defined " |
||||||
|
+ "in shared library and accessed " |
||||||
|
+ "from executable " |
||||||
|
+ "(rebuild file with -fPIC ?)"), |
||||||
|
+ input_bfd, h->root.root.string); |
||||||
|
+ bfd_set_error (bfd_error_bad_value); |
||||||
|
+ return FALSE; |
||||||
|
+ } |
||||||
|
+ |
||||||
|
/* The target of these relocs are instruction operands |
||||||
|
residing in read-only sections. We cannot emit a runtime |
||||||
|
reloc for it. */ |
@ -0,0 +1,18 @@ |
|||||||
|
Only in binutils.orig/ld/testsuite/ld-ifunc: .#ifunc.exp |
||||||
|
diff -rup binutils.orig/ld/testsuite/ld-ifunc/ifunc.exp binutils-2.27/ld/testsuite/ld-ifunc/ifunc.exp |
||||||
|
--- binutils.orig/ld/testsuite/ld-ifunc/ifunc.exp 2017-02-21 15:00:21.802036746 +0000 |
||||||
|
+++ binutils-2.27/ld/testsuite/ld-ifunc/ifunc.exp 2017-02-21 15:06:32.730980432 +0000 |
||||||
|
@@ -531,6 +531,13 @@ run_cc_link_tests [list \ |
||||||
|
] \ |
||||||
|
] |
||||||
|
|
||||||
|
+# IFUNC support for AArch64 is still experimental, and in particular |
||||||
|
+# function resolution is not yet stable. So skip these tests for now. |
||||||
|
+# NC Feb 2017. |
||||||
|
+if {[istarget "aarch64-*-*"]} { |
||||||
|
+ return |
||||||
|
+} |
||||||
|
+ |
||||||
|
run_ld_link_exec_tests [] [list \ |
||||||
|
[list \ |
||||||
|
"Run pr18808" \ |
@ -0,0 +1,26 @@ |
|||||||
|
--- binutils-2.27.orig/ld/testsuite/ld-plugin/lto.exp 2016-09-20 14:11:51.866711051 +0100 |
||||||
|
+++ binutils-2.27/ld/testsuite/ld-plugin/lto.exp 2016-09-20 14:18:28.528223979 +0100 |
||||||
|
@@ -287,11 +287,21 @@ set lto_link_elf_tests [list \ |
||||||
|
{dummy.c} {} "pr16746a.exe"] \ |
||||||
|
[list "PR ld/16746 (2)" \ |
||||||
|
"-O2 -flto -fuse-linker-plugin tmpdir/pr16746c.o tmpdir/pr16746a.o" "-O2 -flto" \ |
||||||
|
- {dummy.c} {} "pr16746b.exe"] \ |
||||||
|
+ {dummy.c} {} "pr16746b.exe"] \ |
||||||
|
+] |
||||||
|
+ |
||||||
|
+# PR 14918 checks that libgcc is not spuriously included in a shared link of |
||||||
|
+# an empty program. The ARM crt1.o startup code however calls __libc_csu_init |
||||||
|
+# in /usr/lib/libc_nonshared.a(elf-init.oS). This in turn needs |
||||||
|
+# __aeabi_unwind_cpp_pr0@@GCC_3.5 which is provided by libgcc_s.so.1, so the |
||||||
|
+# test fails. Hence this code to skip the test. |
||||||
|
+if { ! [istarget "arm*-*-*"] } { |
||||||
|
+ set lto_link_elf_tests [concat $lto_link_elf_tests [list \ |
||||||
|
[list "PR ld/14918" \ |
||||||
|
"-flto" "-flto" \ |
||||||
|
{pr14918.c} {{"readelf" {-d --wide} "pr14918.d"}} "pr14918.exe" "c"] \ |
||||||
|
-] |
||||||
|
+ ]] |
||||||
|
+} |
||||||
|
|
||||||
|
# Check final symbols in executables. |
||||||
|
set lto_link_symbol_tests [list \ |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,141 @@ |
|||||||
|
--- binutils-2.25.1/gas/testsuite/gas/ppc/power7.s 2015-07-21 09:20:58.000000000 +0100 |
||||||
|
+++ binutils-2.25.1.new/gas/testsuite/gas/ppc/power7.s 2016-03-01 14:08:17.020136029 +0000 |
||||||
|
@@ -98,4 +98,4 @@ power7: |
||||||
|
mfppr32 11 |
||||||
|
mtppr 12 |
||||||
|
mtppr32 13 |
||||||
|
- tlbie 10,11 |
||||||
|
+ tlbie 10 |
||||||
|
--- binutils-2.25.1/gas/testsuite/gas/ppc/power7.d 2015-07-21 09:20:58.000000000 +0100 |
||||||
|
+++ binutils-2.25.1.new/gas/testsuite/gas/ppc/power7.d 2016-03-01 14:08:17.020136029 +0000 |
||||||
|
@@ -107,5 +107,5 @@ Disassembly of section \.text: |
||||||
|
.*: (7d 62 e2 a6|a6 e2 62 7d) mfppr32 r11 |
||||||
|
.*: (7d 80 e3 a6|a6 e3 80 7d) mtppr r12 |
||||||
|
.*: (7d a2 e3 a6|a6 e3 a2 7d) mtppr32 r13 |
||||||
|
-.*: (7d 60 52 64|64 52 60 7d) tlbie r10,r11 |
||||||
|
+.*: (7c 00 52 64|64 52 00 7c) tlbie r10 |
||||||
|
#pass |
||||||
|
--- binutils.orig/opcodes/ppc-opc.c 2017-01-17 09:44:23.341397357 +0000 |
||||||
|
+++ binutils-2.27/opcodes/ppc-opc.c 2017-01-17 09:45:24.000684653 +0000 |
||||||
|
@@ -5182,8 +5182,7 @@ const struct powerpc_opcode powerpc_opco |
||||||
|
{"mfbhrbe", X(31,302), X_MASK, POWER8, 0, {RT, BHRBE}}, |
||||||
|
|
||||||
|
{"tlbie", X(31,306), X_MASK|1<<20,POWER9, TITAN, {RB, RS, RIC, PRS, X_R}}, |
||||||
|
-{"tlbie", X(31,306), XRA_MASK, POWER7, POWER9|TITAN, {RB, RS}}, |
||||||
|
-{"tlbie", X(31,306), XRTLRA_MASK, PPC, E500|POWER7|TITAN, {RB, L}}, |
||||||
|
+{"tlbie", X(31,306), XRTLRA_MASK, PPC, POWER9|TITAN, {RB, L}}, |
||||||
|
{"tlbi", X(31,306), XRT_MASK, POWER, 0, {RA0, RB}}, |
||||||
|
|
||||||
|
{"mfvsrld", X(31,307), XX1RB_MASK, PPCVSX3, 0, {RA, XS6}}, |
||||||
|
--- binutils.orig/gas/testsuite/gas/ppc/e500-ill.s 2017-01-17 10:34:39.821866168 +0000 |
||||||
|
+++ binutils-2.27/gas/testsuite/gas/ppc/e500-ill.s 2017-01-17 10:56:56.766061777 +0000 |
||||||
|
@@ -7,4 +7,4 @@ start: |
||||||
|
mfdcr 5, 234 |
||||||
|
mtdcr 432, 8 |
||||||
|
tlbia |
||||||
|
- tlbie 3 |
||||||
|
+ |
||||||
|
--- binutils.orig/gas/testsuite/gas/ppc/e500-ill.l 2017-01-17 10:34:39.821866168 +0000 |
||||||
|
+++ binutils-2.27/gas/testsuite/gas/ppc/e500-ill.l 2017-01-17 10:57:09.021915557 +0000 |
||||||
|
@@ -5,4 +5,3 @@ |
||||||
|
.*: Error: unrecognized opcode: `mfdcr' |
||||||
|
.*: Error: unrecognized opcode: `mtdcr' |
||||||
|
.*: Error: unrecognized opcode: `tlbia' |
||||||
|
-.*: Error: unrecognized opcode: `tlbie' |
||||||
|
--- binutils.orig/gas/testsuite/gas/ppc/power6.s 2017-01-17 10:34:39.822866157 +0000 |
||||||
|
+++ binutils-2.27/gas/testsuite/gas/ppc/power6.s 2017-01-17 10:58:38.316849143 +0000 |
||||||
|
@@ -69,6 +69,5 @@ start: |
||||||
|
slbia |
||||||
|
slbia 0 |
||||||
|
slbia 7 |
||||||
|
- tlbie 10 |
||||||
|
tlbie 10,0 |
||||||
|
tlbie 10,1 |
||||||
|
--- binutils.orig/gas/testsuite/gas/ppc/power6.d 2017-01-17 10:34:39.822866157 +0000 |
||||||
|
+++ binutils-2.27/gas/testsuite/gas/ppc/power6.d 2017-01-17 10:59:24.780294250 +0000 |
||||||
|
@@ -74,7 +74,6 @@ Disassembly of section \.text: |
||||||
|
.*: (7c 00 03 e4|e4 03 00 7c) slbia |
||||||
|
.*: (7c 00 03 e4|e4 03 00 7c) slbia |
||||||
|
.*: (7c e0 03 e4|e4 03 e0 7c) slbia 7 |
||||||
|
-.*: (7c 00 52 64|64 52 00 7c) tlbie r10 |
||||||
|
-.*: (7c 00 52 64|64 52 00 7c) tlbie r10 |
||||||
|
+.*: (7c 00 52 64|64 52 00 7c) tlbie r10,0 |
||||||
|
.*: (7c 20 52 64|64 52 20 7c) tlbie r10,1 |
||||||
|
#pass |
||||||
|
--- binutils.orig/gas/testsuite/gas/ppc/power7.s 2017-01-17 10:34:39.823866144 +0000 |
||||||
|
+++ binutils-2.27/gas/testsuite/gas/ppc/power7.s 2017-01-17 11:00:19.835636746 +0000 |
||||||
|
@@ -98,4 +98,4 @@ power7: |
||||||
|
mfppr32 11 |
||||||
|
mtppr 12 |
||||||
|
mtppr32 13 |
||||||
|
- tlbie 10 |
||||||
|
+ |
||||||
|
--- binutils.orig/gas/testsuite/gas/ppc/power7.d 2017-01-17 10:34:39.822866157 +0000 |
||||||
|
+++ binutils-2.27/gas/testsuite/gas/ppc/power7.d 2017-01-17 11:00:27.995539295 +0000 |
||||||
|
@@ -107,5 +107,4 @@ Disassembly of section \.text: |
||||||
|
.*: (7d 62 e2 a6|a6 e2 62 7d) mfppr32 r11 |
||||||
|
.*: (7d 80 e3 a6|a6 e3 80 7d) mtppr r12 |
||||||
|
.*: (7d a2 e3 a6|a6 e3 a2 7d) mtppr32 r13 |
||||||
|
-.*: (7c 00 52 64|64 52 00 7c) tlbie r10 |
||||||
|
#pass |
||||||
|
diff -rup binutils.orig/gas/config/tc-ppc.c binutils-2.27/gas/config/tc-ppc.c |
||||||
|
--- binutils.orig/gas/config/tc-ppc.c 2017-02-02 12:21:55.246930313 +0000 |
||||||
|
+++ binutils-2.27/gas/config/tc-ppc.c 2017-02-02 12:29:13.568862941 +0000 |
||||||
|
@@ -2672,7 +2672,7 @@ md_assemble (char *str) |
||||||
|
|
||||||
|
operand = &powerpc_operands[*opindex_ptr]; |
||||||
|
if ((operand->flags & PPC_OPERAND_OPTIONAL) != 0 |
||||||
|
- && !((operand->flags & PPC_OPERAND_OPTIONAL32) != 0 && ppc_obj64)) |
||||||
|
+ || (operand->flags & PPC_OPERAND_OPTIONAL32)) |
||||||
|
{ |
||||||
|
unsigned int opcount; |
||||||
|
unsigned int num_operands_expected; |
||||||
|
@@ -2741,8 +2741,8 @@ md_assemble (char *str) |
||||||
|
|
||||||
|
/* If this is an optional operand, and we are skipping it, just |
||||||
|
insert a zero. */ |
||||||
|
- if ((operand->flags & PPC_OPERAND_OPTIONAL) != 0 |
||||||
|
- && !((operand->flags & PPC_OPERAND_OPTIONAL32) != 0 && ppc_obj64) |
||||||
|
+ if (((operand->flags & PPC_OPERAND_OPTIONAL) != 0 |
||||||
|
+ || (operand->flags & PPC_OPERAND_OPTIONAL32) != 0) |
||||||
|
&& skip_optional) |
||||||
|
{ |
||||||
|
long val = ppc_optional_operand_value (operand); |
||||||
|
diff -rup binutils-2.27.orig/gas/testsuite/gas/ppc/power6.d binutils-2.27/gas/testsuite/gas/ppc/power6.d |
||||||
|
--- binutils-2.27.orig/gas/testsuite/gas/ppc/power6.d 2017-02-14 10:17:21.352033787 +0000 |
||||||
|
+++ binutils-2.27/gas/testsuite/gas/ppc/power6.d 2017-02-14 11:54:36.643091777 +0000 |
||||||
|
@@ -74,6 +74,6 @@ Disassembly of section \.text: |
||||||
|
.*: (7c 00 03 e4|e4 03 00 7c) slbia |
||||||
|
.*: (7c 00 03 e4|e4 03 00 7c) slbia |
||||||
|
.*: (7c e0 03 e4|e4 03 e0 7c) slbia 7 |
||||||
|
-.*: (7c 00 52 64|64 52 00 7c) tlbie r10,0 |
||||||
|
+.*: (7c 00 52 64|64 52 00 7c) tlbie r10 |
||||||
|
.*: (7c 20 52 64|64 52 20 7c) tlbie r10,1 |
||||||
|
#pass |
||||||
|
diff -rup binutils-2.27.orig/opcodes/ppc-opc.c binutils-2.27/opcodes/ppc-opc.c |
||||||
|
--- binutils-2.27.orig/opcodes/ppc-opc.c 2017-02-14 10:17:22.281021961 +0000 |
||||||
|
+++ binutils-2.27/opcodes/ppc-opc.c 2017-02-14 11:58:50.035840144 +0000 |
||||||
|
@@ -576,9 +576,12 @@ const struct powerpc_operand powerpc_ope |
||||||
|
#define RD RS |
||||||
|
{ 0x1f, 21, NULL, NULL, PPC_OPERAND_GPR }, |
||||||
|
|
||||||
|
+#define RSLL RS + 1 |
||||||
|
+ { 0x1f, 21, NULL, NULL, PPC_OPERAND_GPR | PPC_OPERAND_OPTIONAL32 }, |
||||||
|
+ |
||||||
|
/* The RS and RT fields of the DS form stq and DQ form lq instructions, |
||||||
|
which have special value restrictions. */ |
||||||
|
-#define RSQ RS + 1 |
||||||
|
+#define RSQ RSLL + 1 |
||||||
|
#define RTQ RSQ |
||||||
|
{ 0x1e, 21, NULL, NULL, PPC_OPERAND_GPR }, |
||||||
|
|
||||||
|
@@ -5132,7 +5135,8 @@ const struct powerpc_opcode powerpc_opco |
||||||
|
{"mfbhrbe", X(31,302), X_MASK, POWER8, 0, {RT, BHRBE}}, |
||||||
|
|
||||||
|
{"tlbie", X(31,306), X_MASK|1<<20,POWER9, TITAN, {RB, RS, RIC, PRS, X_R}}, |
||||||
|
-{"tlbie", X(31,306), XRTLRA_MASK, PPC, POWER9|TITAN, {RB, L}}, |
||||||
|
+{"tlbie", X(31,306), XRA_MASK, POWER7, POWER9|TITAN, {RB, RSLL}}, |
||||||
|
+{"tlbie", X(31,306), XRTLRA_MASK, PPC, E500|POWER7|TITAN, {RB, LOPT}}, |
||||||
|
{"tlbi", X(31,306), XRT_MASK, POWER, 0, {RA0, RB}}, |
||||||
|
|
||||||
|
{"mfvsrld", X(31,307), XX1RB_MASK, PPCVSX3, 0, {RA, XS6}}, |
@ -0,0 +1,104 @@ |
|||||||
|
--- binutils.orig/gold/aarch64.cc 2017-01-18 16:05:12.747684566 +0000 |
||||||
|
+++ binutils-2.27/gold/aarch64.cc 2017-01-18 16:05:23.128501011 +0000 |
||||||
|
@@ -784,8 +784,14 @@ Stub_template_repertoire<big_endian>::St |
||||||
|
0x14000000, /* b <label> */ |
||||||
|
}; |
||||||
|
|
||||||
|
- // ST_E_835769 has the same stub template as ST_E_843419. |
||||||
|
- const static Insntype* ST_E_835769_INSNS = ST_E_843419_INSNS; |
||||||
|
+ // ST_E_835769 has the same stub template as ST_E_843419 |
||||||
|
+ // but we reproduce the array here so that the sizeof |
||||||
|
+ // expressions in install_insn_template will work. |
||||||
|
+ const static Insntype ST_E_835769_INSNS[] = |
||||||
|
+ { |
||||||
|
+ 0x00000000, /* Placeholder for erratum insn. */ |
||||||
|
+ 0x14000000, /* b <label> */ |
||||||
|
+ }; |
||||||
|
|
||||||
|
#define install_insn_template(T) \ |
||||||
|
const static Stub_template<big_endian> template_##T = { \ |
||||||
|
--- binutils.orig/gas/config/tc-i386.c 2017-01-18 16:05:12.533688350 +0000 |
||||||
|
+++ binutils-2.27/gas/config/tc-i386.c 2017-01-18 16:11:29.828016979 +0000 |
||||||
|
@@ -4120,13 +4120,13 @@ parse_operands (char *l, const char *mne |
||||||
|
{ /* Yes, we've read in another operand. */ |
||||||
|
unsigned int operand_ok; |
||||||
|
this_operand = i.operands++; |
||||||
|
- i.types[this_operand].bitfield.unspecified = 1; |
||||||
|
if (i.operands > MAX_OPERANDS) |
||||||
|
{ |
||||||
|
as_bad (_("spurious operands; (%d operands/instruction max)"), |
||||||
|
MAX_OPERANDS); |
||||||
|
return NULL; |
||||||
|
} |
||||||
|
+ i.types[this_operand].bitfield.unspecified = 1; |
||||||
|
/* Now parse operand adding info to 'i' as we go along. */ |
||||||
|
END_STRING_AND_SAVE (l); |
||||||
|
|
||||||
|
diff -rup binutils.orig/ld/testplug2.c binutils-2.27/ld/testplug2.c |
||||||
|
--- binutils.orig/ld/testplug2.c 2017-01-18 16:05:12.777684035 +0000 |
||||||
|
+++ binutils-2.27/ld/testplug2.c 2017-01-18 16:18:39.437420563 +0000 |
||||||
|
@@ -242,10 +242,11 @@ parse_symdefstr (const char *str, struct |
||||||
|
sym->version = NULL; |
||||||
|
if (colon5 && colon5[1]) |
||||||
|
{ |
||||||
|
- sym->comdat_key = malloc (strlen (colon5 + 1) + 1); |
||||||
|
+ ++colon5; |
||||||
|
+ sym->comdat_key = malloc (strlen (colon5) + 1); |
||||||
|
if (!sym->comdat_key) |
||||||
|
return LDPS_ERR; |
||||||
|
- strcpy (sym->comdat_key, colon5 + 1); |
||||||
|
+ strcpy (sym->comdat_key, colon5); |
||||||
|
} |
||||||
|
else |
||||||
|
sym->comdat_key = 0; |
||||||
|
diff -rup binutils.orig/ld/testplug3.c binutils-2.27/ld/testplug3.c |
||||||
|
--- binutils.orig/ld/testplug3.c 2017-01-18 16:05:12.777684035 +0000 |
||||||
|
+++ binutils-2.27/ld/testplug3.c 2017-01-18 16:17:48.878314557 +0000 |
||||||
|
@@ -241,10 +241,11 @@ parse_symdefstr (const char *str, struct |
||||||
|
sym->version = NULL; |
||||||
|
if (colon5 && colon5[1]) |
||||||
|
{ |
||||||
|
- sym->comdat_key = malloc (strlen (colon5 + 1) + 1); |
||||||
|
+ ++colon5; |
||||||
|
+ sym->comdat_key = malloc (strlen (colon5) + 1); |
||||||
|
if (!sym->comdat_key) |
||||||
|
return LDPS_ERR; |
||||||
|
- strcpy (sym->comdat_key, colon5 + 1); |
||||||
|
+ strcpy (sym->comdat_key, colon5); |
||||||
|
} |
||||||
|
else |
||||||
|
sym->comdat_key = 0; |
||||||
|
diff -rup binutils.orig/ld/testplug4.c binutils-2.27/ld/testplug4.c |
||||||
|
--- binutils.orig/ld/testplug4.c 2017-01-18 16:05:12.777684035 +0000 |
||||||
|
+++ binutils-2.27/ld/testplug4.c 2017-01-18 16:16:34.751625275 +0000 |
||||||
|
@@ -242,10 +242,11 @@ parse_symdefstr (const char *str, struct |
||||||
|
sym->version = NULL; |
||||||
|
if (colon5 && colon5[1]) |
||||||
|
{ |
||||||
|
- sym->comdat_key = malloc (strlen (colon5 + 1) + 1); |
||||||
|
+ ++colon5; |
||||||
|
+ sym->comdat_key = malloc (strlen (colon5) + 1); |
||||||
|
if (!sym->comdat_key) |
||||||
|
return LDPS_ERR; |
||||||
|
- strcpy (sym->comdat_key, colon5 + 1); |
||||||
|
+ strcpy (sym->comdat_key, colon5); |
||||||
|
} |
||||||
|
else |
||||||
|
sym->comdat_key = 0; |
||||||
|
diff -rup binutils.orig/ld/testplug.c binutils-2.27/ld/testplug.c |
||||||
|
--- binutils.orig/ld/testplug.c 2017-01-18 16:05:12.777684035 +0000 |
||||||
|
+++ binutils-2.27/ld/testplug.c 2017-01-18 16:19:22.460659820 +0000 |
||||||
|
@@ -238,10 +238,11 @@ parse_symdefstr (const char *str, struct |
||||||
|
sym->version = NULL; |
||||||
|
if (colon5 && colon5[1]) |
||||||
|
{ |
||||||
|
- sym->comdat_key = malloc (strlen (colon5 + 1) + 1); |
||||||
|
+ ++colon5; |
||||||
|
+ sym->comdat_key = malloc (strlen (colon5) + 1); |
||||||
|
if (!sym->comdat_key) |
||||||
|
return LDPS_ERR; |
||||||
|
- strcpy (sym->comdat_key, colon5 + 1); |
||||||
|
+ strcpy (sym->comdat_key, colon5); |
||||||
|
} |
||||||
|
else |
||||||
|
sym->comdat_key = 0; |
@ -0,0 +1,20 @@ |
|||||||
|
--- ld/emultempl/armelf.em~ 2015-03-18 17:32:36.436208938 -0400 |
||||||
|
+++ ld/emultempl/armelf.em 2015-03-18 17:32:54.455591126 -0400 |
||||||
|
@@ -53,6 +53,7 @@ |
||||||
|
input_flags.dynamic = ${DYNAMIC_LINK-TRUE}; |
||||||
|
config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo TRUE ; else echo FALSE ; fi`; |
||||||
|
config.separate_code = `if test "x${SEPARATE_CODE}" = xyes ; then echo TRUE ; else echo FALSE ; fi`; |
||||||
|
+ link_info.relro = TRUE; |
||||||
|
} |
||||||
|
|
||||||
|
static void |
||||||
|
--- ld/emultempl/aarch64elf.em~ 2015-03-18 17:32:08.347172011 -0400 |
||||||
|
+++ ld/emultempl/aarch64elf.em 2015-03-18 17:32:30.866399906 -0400 |
||||||
|
@@ -40,6 +40,7 @@ |
||||||
|
input_flags.dynamic = ${DYNAMIC_LINK-TRUE}; |
||||||
|
config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo TRUE ; else echo FALSE ; fi`; |
||||||
|
config.separate_code = `if test "x${SEPARATE_CODE}" = xyes ; then echo TRUE ; else echo FALSE ; fi`; |
||||||
|
+ link_info.relro = TRUE; |
||||||
|
} |
||||||
|
|
||||||
|
static void |
@ -0,0 +1,20 @@ |
|||||||
|
diff -rup binutils-2.27.orig/bfd/elf-eh-frame.c binutils-2.27/bfd/elf-eh-frame.c |
||||||
|
--- binutils-2.27.orig/bfd/elf-eh-frame.c 2017-01-16 17:27:46.411632857 +0000 |
||||||
|
+++ binutils-2.27/bfd/elf-eh-frame.c 2017-01-16 17:30:03.663437755 +0000 |
||||||
|
@@ -2296,7 +2296,15 @@ 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 |
||||||
|
+ 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].range |
||||||
|
+ == hdr_info->u.dwarf.array[i - 1].range) |
||||||
|
+ /* Duplicate FDE entry. We should probably discard it |
||||||
|
+ but for now just ignore it. */ |
||||||
|
+ ; |
||||||
|
+ else 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))) |
@ -0,0 +1,139 @@ |
|||||||
|
--- binutils-2.25.1.new/ld/testsuite/ld-powerpc/tlsso32.r 2016-03-01 14:08:17.249137110 +0000 |
||||||
|
+++ binutils-2.25.1/ld/testsuite/ld-powerpc/tlsso32.r 2016-03-01 15:10:02.847812018 +0000 |
||||||
|
@@ -20,6 +20,7 @@ Section Headers: |
||||||
|
+\[[ 0-9]+\] \.dynamic +DYNAMIC .* 08 +WA +3 +0 +4 |
||||||
|
+\[[ 0-9]+\] \.got +PROGBITS .* 0+30 04 +WA +0 +0 +4 |
||||||
|
+\[[ 0-9]+\] \.plt +PROGBITS .* 0+4 00 +WA +0 +0 +4 |
||||||
|
+#... |
||||||
|
+\[[ 0-9]+\] \.shstrtab +.* |
||||||
|
+\[[ 0-9]+\] \.symtab +.* |
||||||
|
+\[[ 0-9]+\] \.strtab +.* |
||||||
|
@@ -80,12 +81,12 @@ Symbol table '\.dynsym' contains [0-9]+ |
||||||
|
.* TLS +GLOBAL +DEFAULT +8 le1 |
||||||
|
.* TLS +GLOBAL +DEFAULT +UND ld |
||||||
|
.* NOTYPE +GLOBAL +DEFAULT +6 _start |
||||||
|
-.* NOTYPE +GLOBAL +DEFAULT +11 __end |
||||||
|
+.* NOTYPE +GLOBAL +DEFAULT +.. __end |
||||||
|
.* TLS +GLOBAL +DEFAULT +8 ld2 |
||||||
|
.* TLS +GLOBAL +DEFAULT +8 ld1 |
||||||
|
-.* NOTYPE +GLOBAL +DEFAULT +11 __bss_start |
||||||
|
-.* NOTYPE +GLOBAL +DEFAULT +11 _edata |
||||||
|
-.* NOTYPE +GLOBAL +DEFAULT +11 _end |
||||||
|
+.* NOTYPE +GLOBAL +DEFAULT +.. __bss_start |
||||||
|
+.* NOTYPE +GLOBAL +DEFAULT +.. _edata |
||||||
|
+.* NOTYPE +GLOBAL +DEFAULT +.. _end |
||||||
|
.* TLS +GLOBAL +DEFAULT +8 gd0 |
||||||
|
.* TLS +GLOBAL +DEFAULT +8 ie0 |
||||||
|
|
||||||
|
@@ -103,32 +104,4 @@ Symbol table '\.symtab' contains [0-9]+ |
||||||
|
.* SECTION +LOCAL +DEFAULT +9 |
||||||
|
.* SECTION +LOCAL +DEFAULT +10 |
||||||
|
.* SECTION +LOCAL +DEFAULT +11 |
||||||
|
-.* FILE +LOCAL +DEFAULT +ABS .* |
||||||
|
-.* TLS +LOCAL +DEFAULT +7 gd4 |
||||||
|
-.* TLS +LOCAL +DEFAULT +7 ld4 |
||||||
|
-.* TLS +LOCAL +DEFAULT +7 ld5 |
||||||
|
-.* TLS +LOCAL +DEFAULT +7 ld6 |
||||||
|
-.* TLS +LOCAL +DEFAULT +7 ie4 |
||||||
|
-.* TLS +LOCAL +DEFAULT +7 le4 |
||||||
|
-.* TLS +LOCAL +DEFAULT +7 le5 |
||||||
|
-.* FILE +LOCAL +DEFAULT +ABS .* |
||||||
|
-.* OBJECT +LOCAL +DEFAULT +9 _DYNAMIC |
||||||
|
-.* NOTYPE +LOCAL +DEFAULT +6 0+8000\.got2\.plt_pic32\.__tls_get_addr |
||||||
|
-.* NOTYPE +LOCAL +DEFAULT +6 __glink_PLTresolve |
||||||
|
-.* NOTYPE +LOCAL +DEFAULT +6 __glink |
||||||
|
-.* OBJECT +LOCAL +DEFAULT +10 _GLOBAL_OFFSET_TABLE_ |
||||||
|
-.* TLS +GLOBAL +DEFAULT +UND gd |
||||||
|
-.* TLS +GLOBAL +DEFAULT +8 le0 |
||||||
|
-.* NOTYPE +GLOBAL +DEFAULT +UND __tls_get_addr |
||||||
|
-.* TLS +GLOBAL +DEFAULT +8 ld0 |
||||||
|
-.* TLS +GLOBAL +DEFAULT +8 le1 |
||||||
|
-.* TLS +GLOBAL +DEFAULT +UND ld |
||||||
|
-.* NOTYPE +GLOBAL +DEFAULT +6 _start |
||||||
|
-.* NOTYPE +GLOBAL +DEFAULT +11 __end |
||||||
|
-.* TLS +GLOBAL +DEFAULT +8 ld2 |
||||||
|
-.* TLS +GLOBAL +DEFAULT +8 ld1 |
||||||
|
-.* NOTYPE +GLOBAL +DEFAULT +11 __bss_start |
||||||
|
-.* NOTYPE +GLOBAL +DEFAULT +11 _edata |
||||||
|
-.* NOTYPE +GLOBAL +DEFAULT +11 _end |
||||||
|
-.* TLS +GLOBAL +DEFAULT +8 gd0 |
||||||
|
-.* TLS +GLOBAL +DEFAULT +8 ie0 |
||||||
|
+#pass |
||||||
|
--- binutils-2.25.1.new/ld/testsuite/ld-powerpc/tlsexe32.r 2016-03-01 14:08:17.248137105 +0000 |
||||||
|
+++ binutils-2.25.1/ld/testsuite/ld-powerpc/tlsexe32.r 2016-03-01 15:08:57.693493230 +0000 |
||||||
|
@@ -22,6 +22,7 @@ Section Headers: |
||||||
|
+\[[ 0-9]+\] \.dynamic +DYNAMIC +[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 08 +WA +4 +0 +4 |
||||||
|
+\[[ 0-9]+\] \.got +PROGBITS +[0-9a-f]+ [0-9a-f]+ 000018 04 +WA +0 +0 +4 |
||||||
|
+\[[ 0-9]+\] \.plt +PROGBITS +[0-9a-f]+ [0-9a-f]+ 000004 00 +WA +0 +0 +4 |
||||||
|
+#... |
||||||
|
+\[[ 0-9]+\] \.shstrtab +STRTAB +.* |
||||||
|
+\[[ 0-9]+\] \.symtab +SYMTAB +.* |
||||||
|
+\[[ 0-9]+\] \.strtab +STRTAB +.* |
||||||
|
@@ -64,11 +65,11 @@ Symbol table '\.dynsym' contains [0-9]+ |
||||||
|
.* NOTYPE +LOCAL +DEFAULT +UND |
||||||
|
.* TLS +GLOBAL +DEFAULT +UND gd |
||||||
|
.* TLS +GLOBAL +DEFAULT +UND ld |
||||||
|
-.* NOTYPE +GLOBAL +DEFAULT +12 __end |
||||||
|
-.* NOTYPE +GLOBAL +DEFAULT +12 __bss_start |
||||||
|
+.* NOTYPE +GLOBAL +DEFAULT +.. __end |
||||||
|
+.* NOTYPE +GLOBAL +DEFAULT +.. __bss_start |
||||||
|
.* FUNC +GLOBAL +DEFAULT +UND __tls_get_addr_opt |
||||||
|
-.* NOTYPE +GLOBAL +DEFAULT +12 _edata |
||||||
|
-.* NOTYPE +GLOBAL +DEFAULT +12 _end |
||||||
|
+.* NOTYPE +GLOBAL +DEFAULT +.. _edata |
||||||
|
+.* NOTYPE +GLOBAL +DEFAULT +.. _end |
||||||
|
|
||||||
|
Symbol table '\.symtab' contains [0-9]+ entries: |
||||||
|
+Num: +Value +Size +Type +Bind +Vis +Ndx +Name |
||||||
|
@@ -85,29 +86,5 @@ Symbol table '\.symtab' contains [0-9]+ |
||||||
|
.* SECTION +LOCAL +DEFAULT +10 |
||||||
|
.* SECTION +LOCAL +DEFAULT +11 |
||||||
|
.* SECTION +LOCAL +DEFAULT +12 |
||||||
|
-.* FILE +LOCAL +DEFAULT +ABS .* |
||||||
|
-.* TLS +LOCAL +DEFAULT +8 gd4 |
||||||
|
-.* TLS +LOCAL +DEFAULT +8 ld4 |
||||||
|
-.* TLS +LOCAL +DEFAULT +8 ld5 |
||||||
|
-.* TLS +LOCAL +DEFAULT +8 ld6 |
||||||
|
-.* TLS +LOCAL +DEFAULT +8 ie4 |
||||||
|
-.* TLS +LOCAL +DEFAULT +8 le4 |
||||||
|
-.* TLS +LOCAL +DEFAULT +8 le5 |
||||||
|
-.* FILE +LOCAL +DEFAULT +ABS .* |
||||||
|
-.* OBJECT +LOCAL +DEFAULT +10 _DYNAMIC |
||||||
|
-.* OBJECT +LOCAL +DEFAULT +11 _GLOBAL_OFFSET_TABLE_ |
||||||
|
-.* TLS +GLOBAL +DEFAULT +UND gd |
||||||
|
-.* TLS +GLOBAL +DEFAULT +9 le0 |
||||||
|
-.* TLS +GLOBAL +DEFAULT +9 ld0 |
||||||
|
-.* TLS +GLOBAL +DEFAULT +9 le1 |
||||||
|
-.* TLS +GLOBAL +DEFAULT +UND ld |
||||||
|
-.* NOTYPE +GLOBAL +DEFAULT +7 _start |
||||||
|
-.* NOTYPE +GLOBAL +DEFAULT +12 __end |
||||||
|
-.* TLS +GLOBAL +DEFAULT +9 ld2 |
||||||
|
-.* TLS +GLOBAL +DEFAULT +9 ld1 |
||||||
|
-.* NOTYPE +GLOBAL +DEFAULT +12 __bss_start |
||||||
|
-.* FUNC +GLOBAL +DEFAULT +UND __tls_get_addr_opt |
||||||
|
-.* NOTYPE +GLOBAL +DEFAULT +12 _edata |
||||||
|
-.* NOTYPE +GLOBAL +DEFAULT +12 _end |
||||||
|
-.* TLS +GLOBAL +DEFAULT +9 gd0 |
||||||
|
-.* TLS +GLOBAL +DEFAULT +9 ie0 |
||||||
|
+#pass |
||||||
|
+ |
||||||
|
diff -rup binutils-2.27.orig/ld/testsuite/ld-powerpc/powerpc.exp binutils-2.27/ld/testsuite/ld-powerpc/powerpc.exp |
||||||
|
--- binutils-2.27.orig/ld/testsuite/ld-powerpc/powerpc.exp 2017-01-16 17:27:46.697628285 +0000 |
||||||
|
+++ binutils-2.27/ld/testsuite/ld-powerpc/powerpc.exp 2017-01-16 17:34:34.684104074 +0000 |
||||||
|
@@ -102,13 +102,13 @@ set ppcelftests { |
||||||
|
{{objdump -hw reloc.d}} "reloc.so"} |
||||||
|
{"APUinfo section processing" "-melf32ppc" "" |
||||||
|
"-a32 -me500" {apuinfo1.s apuinfo-nul.s apuinfo2.s} |
||||||
|
- {{readelf -x2 apuinfo.rd}} "apuinfo"} |
||||||
|
+ {{readelf -x.PPC.EMB.apuinfo apuinfo.rd}} "apuinfo"} |
||||||
|
{"APUinfo VLE section processing" "-melf32ppc" "" |
||||||
|
"-a32 -me500 -mvle" {apuinfo1.s apuinfo-vle.s apuinfo-vle2.s} |
||||||
|
- {{readelf -x2 apuinfo-vle.rd}} "apuinfo-vle"} |
||||||
|
+ {{readelf -x.PPC.EMB.apuinfo apuinfo-vle.rd}} "apuinfo-vle"} |
||||||
|
{"APUinfo NULL section processing" "-melf32ppc" "" |
||||||
|
"-a32 -me500" {apuinfo-nul1.s apuinfo-nul.s} |
||||||
|
- {{readelf -x2 apuinfo-nul.rd}} "apuinfo"} |
||||||
|
+ {{readelf -x.PPC.EMB.apuinfo apuinfo-nul.rd}} "apuinfo"} |
||||||
|
{"TLS32 static exec" "-melf32ppc" "" "-a32" {tls32.s tlslib32.s} |
||||||
|
{{objdump -dr tls32.d} {objdump -sj.got tls32.g} |
||||||
|
{objdump -sj.tdata tls32.t}} |
Binary file not shown.
Loading…
Reference in new issue