Rebase the source on the new 2.25 FSF binutils release.

This commit is contained in:
Nick Clifton 2014-12-24 12:11:52 +00:00
parent ea1b2220db
commit cb347a47c2
38 changed files with 5302 additions and 6430 deletions

View File

@ -1,19 +1,17 @@
*** ../binutils-2.20.51.0.10.original/bfd/elf.c 2010-08-10 15:04:55.000000000 +0100
--- bfd/elf.c 2010-08-10 15:05:42.000000000 +0100
*************** _bfd_elf_copy_private_bfd_data (bfd *ibf
*** 1074,1079 ****
--- 1074,1087 ----
/* Copy object attributes. */
_bfd_elf_copy_obj_attributes (ibfd, obfd);
+
+ /* If the input BFD has the OSABI field set and the
+ output BFD does not, then copy the value. */
+ if (elf_elfheader (ibfd)->e_ident [EI_OSABI] != ELFOSABI_NONE
+ && elf_elfheader (obfd)->e_ident [EI_OSABI] == ELFOSABI_NONE)
+ elf_elfheader (obfd)->e_ident [EI_OSABI] =
+ elf_elfheader (ibfd)->e_ident [EI_OSABI];
+
return TRUE;
}
--- a/bfd/elf.c 2010-08-10 15:04:55.000000000 +0100
+++ b/bfd/elf.c 2010-08-10 15:05:42.000000000 +0100
@@ -1074,6 +1074,14 @@
/* Copy object attributes. */
_bfd_elf_copy_obj_attributes (ibfd, obfd);
+
+ /* If the input BFD has the OSABI field set and the
+ output BFD does not, then copy the value. */
+ if (elf_elfheader (ibfd)->e_ident [EI_OSABI] != ELFOSABI_NONE
+ && elf_elfheader (obfd)->e_ident [EI_OSABI] == ELFOSABI_NONE)
+ elf_elfheader (obfd)->e_ident [EI_OSABI] =
+ elf_elfheader (ibfd)->e_ident [EI_OSABI];
+
return TRUE;
}

View File

@ -1,14 +1,12 @@
*** ../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
{
--- a/bfd/elf64-ppc.c 2012-09-11 12:13:00.637448573 +0100
+++ b/bfd/elf64-ppc.c 2012-09-11 12:13:17.922449052 +0100
@@ -13523,6 +13523,9 @@
{
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
{

View File

@ -1,24 +1,20 @@
*** ../binutils-2.20.51.0.10.orig/bfd/merge.c 2010-08-20 12:19:33.000000000 +0100
--- bfd/merge.c 2010-08-20 12:18:01.000000000 +0100
*************** sec_merge_emit (bfd *abfd, struct sec_me
*** 307,312 ****
--- 307,315 ----
len = -off & (entry->alignment - 1);
if (len != 0)
{
+ /* We should never have an entry with an alignment
+ greater than the section's alignment. */
+ BFD_ASSERT (len <= (bfd_size_type) (1 << alignment_power));
if (bfd_bwrite (pad, len, abfd) != len)
goto err;
off += len;
*************** sec_merge_emit (bfd *abfd, struct sec_me
*** 324,329 ****
--- 327,333 ----
/* Trailing alignment needed? */
off = sec->size - off;
if (off != 0
+ && alignment_power
&& bfd_bwrite (pad, off, abfd) != off)
goto err;
--- a/bfd/merge.c 2010-08-20 12:19:33.000000000 +0100
+++ b/bfd/merge.c 2010-08-20 12:18:01.000000000 +0100
@@ -307,6 +307,9 @@
len = -off & (entry->alignment - 1);
if (len != 0)
{
+ /* We should never have an entry with an alignment
+ greater than the section's alignment. */
+ BFD_ASSERT (len <= (bfd_size_type) (1 << alignment_power));
if (bfd_bwrite (pad, len, abfd) != len)
goto err;
off += len;
@@ -324,6 +327,7 @@
/* Trailing alignment needed? */
off = sec->size - off;
if (off != 0
+ && alignment_power
&& bfd_bwrite (pad, off, abfd) != off)
goto err;

View File

@ -3,8 +3,8 @@
* emulparams/elf64_ia64.sh (LIBPATH_SUFFIX): Use */lib64 paths on
ia64-linux if /lib64 tree is present.
--- ../binutils-2.19.50.0.1.orig/ld/emulparams/elf64_ia64.sh 2008-11-21 16:45:00.000000000 +0000
+++ ld/emulparams/elf64_ia64.sh 2008-11-21 16:55:46.000000000 +0000
--- a/ld/emulparams/elf64_ia64.sh 2008-11-21 16:45:00.000000000 +0000
+++ b/ld/emulparams/elf64_ia64.sh 2008-11-21 16:55:46.000000000 +0000
@@ -38,3 +38,13 @@ OTHER_READONLY_SECTIONS="${OTHER_READONL
SMALL_DATA_CTOR=" "
SMALL_DATA_DTOR=" "

View File

@ -1,302 +1,236 @@
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
--- a/bfd/configure 2010-04-08 14:53:48.000000000 +0100
+++ b/bfd/configure 2010-04-08 14:56:50.000000000 +0100
@@ -10762,10 +10762,34 @@
# before this can be enabled.
hardcode_into_libs=yes
+ # find out which ABI we are using
+ libsuff=
+ case "$host_cpu" in
+ x86_64*|s390*|powerpc*|ppc*|sparc*)
+ echo 'int i;' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *64-bit*)
+ libsuff=64
+ if test x"$sys_lib_search_path_spec" = x"/lib /usr/lib /usr/local/lib"; then
+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+ fi
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+ esac
+
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on
diff -rcp ../binutils-2.20.51.0.7.original/binutils/configure ./binutils/configure
*** ../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
--- a/binutils/configure 2010-04-08 14:53:45.000000000 +0100
+++ b/binutils/configure 2010-04-08 14:56:21.000000000 +0100
@@ -10560,10 +10560,34 @@
# before this can be enabled.
hardcode_into_libs=yes
+ # find out which ABI we are using
+ libsuff=
+ case "$host_cpu" in
+ x86_64*|s390*|powerpc*|ppc*|sparc*)
+ echo 'int i;' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *64-bit*)
+ libsuff=64
+ if test x"$sys_lib_search_path_spec" = x"/lib /usr/lib /usr/local/lib"; then
+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+ fi
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+ esac
+
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on
diff -rcp ../binutils-2.20.51.0.7.original/gas/configure ./gas/configure
*** ../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
--- a/gas/configure 2010-04-08 14:53:47.000000000 +0100
+++ b/gas/configure 2010-04-08 14:57:24.000000000 +0100
@@ -10547,10 +10547,34 @@
# before this can be enabled.
hardcode_into_libs=yes
+ # find out which ABI we are using
+ libsuff=
+ case "$host_cpu" in
+ x86_64*|s390*|powerpc*|ppc*|sparc*)
+ echo 'int i;' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *64-bit*)
+ libsuff=64
+ if test x"$sys_lib_search_path_spec" = x"/lib /usr/lib /usr/local/lib"; then
+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+ fi
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+ esac
+
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on
diff -rcp ../binutils-2.20.51.0.7.original/gprof/configure ./gprof/configure
*** ../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
--- a/gprof/configure 2010-04-08 14:53:45.000000000 +0100
+++ b/gprof/configure 2010-04-08 14:57:50.000000000 +0100
@@ -10485,10 +10485,34 @@
# before this can be enabled.
hardcode_into_libs=yes
+ # find out which ABI we are using
+ libsuff=
+ case "$host_cpu" in
+ x86_64*|s390*|powerpc*|ppc*|sparc*)
+ echo 'int i;' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *64-bit*)
+ libsuff=64
+ if test x"$sys_lib_search_path_spec" = x"/lib /usr/lib /usr/local/lib"; then
+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+ fi
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+ esac
+
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on
diff -rcp ../binutils-2.20.51.0.7.original/ld/configure ./ld/configure
*** ../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
--- a/ld/configure 2010-04-08 14:53:44.000000000 +0100
+++ b/ld/configure 2010-04-08 14:58:21.000000000 +0100
@@ -10966,10 +10966,34 @@
# before this can be enabled.
hardcode_into_libs=yes
+ # find out which ABI we are using
+ libsuff=
+ case "$host_cpu" in
+ x86_64*|s390*|powerpc*|ppc*|sparc*)
+ echo 'int i;' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *64-bit*)
+ libsuff=64
+ if test x"$sys_lib_search_path_spec" = x"/lib /usr/lib /usr/local/lib"; then
+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+ fi
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+ esac
+
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on
Only in .: .#libtool.m4
Only in .: #libtool.m4#
diff -rcp ../binutils-2.20.51.0.7.original/opcodes/configure ./opcodes/configure
*** ../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
--- a/opcodes/configure 2010-04-08 14:53:45.000000000 +0100
+++ b/opcodes/configure 2010-04-08 14:59:10.000000000 +0100
@@ -10496,10 +10496,34 @@
# before this can be enabled.
hardcode_into_libs=yes
+ # find out which ABI we are using
+ libsuff=
+ case "$host_cpu" in
+ x86_64*|s390*|powerpc*|ppc*|sparc*)
+ echo 'int i;' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *64-bit*)
+ libsuff=64
+ if test x"$sys_lib_search_path_spec" = x"/lib /usr/lib /usr/local/lib"; then
+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+ fi
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+ esac
+
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on

View File

@ -1,60 +0,0 @@
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 15:23:58.000000000 +0100
--- ./bfd/configure 2010-04-08 15:24:06.000000000 +0100
*************** if test "x${ac_cv_sizeof_long}" = "x8";
*** 12819,12829 ****
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
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
BFD_HOSTPTR_T="unsigned long long"
fi
fi
--- 12819,12831 ----
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"
! 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" \
! -a "x${ac_cv_sizeof_long}" != "x8"; then
BFD_HOSTPTR_T="unsigned long long"
fi
fi
diff -rcp ../binutils-2.20.51.0.7.original/bfd/configure.in ./bfd/configure.in
*** ../binutils-2.20.51.0.7.original/bfd/configure.in 2010-04-08 15:23:58.000000000 +0100
--- ./bfd/configure.in 2010-04-08 15:24:06.000000000 +0100
*************** if test "x${ac_cv_sizeof_long}" = "x8";
*** 153,163 ****
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
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
BFD_HOSTPTR_T="unsigned long long"
fi
fi
--- 153,165 ----
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"
! 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" \
! -a "x${ac_cv_sizeof_long}" != "x8"; then
BFD_HOSTPTR_T="unsigned long long"
fi
fi

View File

@ -1,61 +0,0 @@
diff -rcp ../binutils-2.20.51.0.7.original/bfd/Makefile.am ./bfd/Makefile.am
*** ../binutils-2.20.51.0.7.original/bfd/Makefile.am 2010-04-08 15:07:55.000000000 +0100
--- ./bfd/Makefile.am 2010-04-08 15:23:14.000000000 +0100
*************** bfdver.h: $(srcdir)/version.h $(srcdir)/
*** 953,964 ****
report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\
if test "x$(RELEASE)" = x ; then \
bfd_version_date=`sed -n -e 's/.*DATE //p' < $(srcdir)/version.h` ;\
! bfd_version_string="\"$(VERSION).$${bfd_version_date}\"" ;\
! bfd_soversion="$(VERSION).$${bfd_version_date}" ;\
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,@report_bugs_to@,$$report_bugs_to," \
< $(srcdir)/version.h > $@; \
echo "$${bfd_soversion}" > libtool-soversion
--- 953,964 ----
report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\
if test "x$(RELEASE)" = x ; then \
bfd_version_date=`sed -n -e 's/.*DATE //p' < $(srcdir)/version.h` ;\
! bfd_version_string="\"$(VERSION)-%{release} $${bfd_version_date}\"" ;\
! bfd_soversion="$(VERSION)-%{release}" ;\
fi ;\
sed -e "s,@bfd_version@,$$bfd_version," \
-e "s,@bfd_version_string@,$$bfd_version_string," \
! -e "s,@bfd_version_package@,\"version \"," \
-e "s,@report_bugs_to@,$$report_bugs_to," \
< $(srcdir)/version.h > $@; \
echo "$${bfd_soversion}" > libtool-soversion
diff -rcp ../binutils-2.20.51.0.7.original/bfd/Makefile.in ./bfd/Makefile.in
*** ../binutils-2.20.51.0.7.original/bfd/Makefile.in 2010-04-08 15:07:55.000000000 +0100
--- ./bfd/Makefile.in 2010-04-08 15:23:14.000000000 +0100
*************** bfdver.h: $(srcdir)/version.h $(srcdir)/
*** 1982,1993 ****
report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\
if test "x$(RELEASE)" = x ; then \
bfd_version_date=`sed -n -e 's/.*DATE //p' < $(srcdir)/version.h` ;\
! bfd_version_string="\"$(VERSION).$${bfd_version_date}\"" ;\
! bfd_soversion="$(VERSION).$${bfd_version_date}" ;\
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,@report_bugs_to@,$$report_bugs_to," \
< $(srcdir)/version.h > $@; \
echo "$${bfd_soversion}" > libtool-soversion
--- 1982,1993 ----
report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\
if test "x$(RELEASE)" = x ; then \
bfd_version_date=`sed -n -e 's/.*DATE //p' < $(srcdir)/version.h` ;\
! bfd_version_string="\"$(VERSION)-%{release} $${bfd_version_date}\"" ;\
! bfd_soversion="$(VERSION)-%{release}" ;\
fi ;\
sed -e "s,@bfd_version@,$$bfd_version," \
-e "s,@bfd_version_string@,$$bfd_version_string," \
! -e "s,@bfd_version_package@,\"version \"," \
-e "s,@report_bugs_to@,$$report_bugs_to," \
< $(srcdir)/version.h > $@; \
echo "$${bfd_soversion}" > libtool-soversion

View File

@ -1,57 +1,33 @@
*** ../binutils-2.22.52.0.1.orig/bfd/Makefile.am 2012-03-06 14:00:33.229957572 +0000
--- bfd/Makefile.am 2012-04-27 16:46:05.410974817 +0100
*************** if INSTALL_LIBBFD
*** 18,24 ****
bfdlibdir = @bfdlibdir@
bfdincludedir = @bfdincludedir@
bfdlib_LTLIBRARIES = libbfd.la
! bfdinclude_HEADERS = $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/bfdlink.h
else !INSTALL_LIBBFD
# Empty these so that the respective installation directories will not be created.
bfdlibdir =
--- 18,24 ----
bfdlibdir = @bfdlibdir@
bfdincludedir = @bfdincludedir@
bfdlib_LTLIBRARIES = libbfd.la
! 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.22.52.0.1.orig/bfd/Makefile.in 2012-03-06 14:00:32.952957600 +0000
--- bfd/Makefile.in 2012-04-27 16:46:19.718975214 +0100
*************** RECURSIVE_TARGETS = all-recursive check-
*** 138,144 ****
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
am__bfdinclude_HEADERS_DIST = $(INCDIR)/plugin-api.h bfd.h \
! $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/bfdlink.h
HEADERS = $(bfdinclude_HEADERS)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
--- 138,145 ----
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
am__bfdinclude_HEADERS_DIST = $(INCDIR)/plugin-api.h bfd.h \
! $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/bfdlink.h \
! $(INCDIR)/demangle.h
HEADERS = $(bfdinclude_HEADERS)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
*************** libbfd_la_LDFLAGS = $(am__append_1) -rel
*** 331,337 ****
@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)/bfdlink.h $(am__append_2)
@INSTALL_LIBBFD_FALSE@rpath_bfdlibdir = @bfdlibdir@
@INSTALL_LIBBFD_FALSE@noinst_LTLIBRARIES = libbfd.la
AM_CFLAGS = $(WARN_CFLAGS)
--- 332,339 ----
@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)/bfdlink.h $(INCDIR)/demangle.h \
! @INSTALL_LIBBFD_TRUE@ $(am__append_2)
@INSTALL_LIBBFD_FALSE@rpath_bfdlibdir = @bfdlibdir@
@INSTALL_LIBBFD_FALSE@noinst_LTLIBRARIES = libbfd.la
AM_CFLAGS = $(WARN_CFLAGS)
--- 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 =
--- a/bfd/Makefile.in 2012-03-06 14:00:32.952957600 +0000
+++ b/bfd/Makefile.in 2012-04-27 16:46:19.718975214 +0100
@@ -138,7 +138,8 @@
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
am__bfdinclude_HEADERS_DIST = $(INCDIR)/plugin-api.h bfd.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/bfdlink.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/demangle.h
HEADERS = $(bfdinclude_HEADERS)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
@@ -331,7 +332,8 @@
@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)/bfdlink.h $(am__append_2)
+@INSTALL_LIBBFD_TRUE@ $(INCDIR)/bfdlink.h $(INCDIR)/demangle.h \
+@INSTALL_LIBBFD_TRUE@ $(am__append_2)
@INSTALL_LIBBFD_FALSE@rpath_bfdlibdir = @bfdlibdir@
@INSTALL_LIBBFD_FALSE@noinst_LTLIBRARIES = libbfd.la
AM_CFLAGS = $(WARN_CFLAGS)

View File

@ -1,92 +1,58 @@
diff -cpr ../binutils-2.22.52.0.1.orig/ld/testsuite/config/default.exp ld/testsuite/config/default.exp
*** ../binutils-2.22.52.0.1.orig/ld/testsuite/config/default.exp 2012-03-06 14:00:31.141957656 +0000
--- ld/testsuite/config/default.exp 2012-03-06 14:09:33.492940503 +0000
***************
*** 23,29 ****
#
if ![info exists ld] then {
! set ld [findfile $base_dir/ld-new $base_dir/ld-new [transform ld]]
}
if ![info exists as] then {
--- 23,29 ----
#
if ![info exists ld] then {
! set ld "[findfile $base_dir/ld-new $base_dir/ld-new [transform ld]] -znorelro"
}
if ![info exists as] then {
*************** if {![file isdirectory tmpdir/ld]} then
*** 69,75 ****
catch "exec ln -s ../../ld-new tmpdir/ld/ld" status
catch "exec ln -s ld tmpdir/ld/collect-ld" status
}
! set gcc_ld_flag "-B[pwd]/tmpdir/ld/"
# load the linker path
if {[file exists tmpdir/libpath.exp]} {
--- 69,75 ----
catch "exec ln -s ../../ld-new tmpdir/ld/ld" status
catch "exec ln -s ld tmpdir/ld/collect-ld" status
}
! set gcc_ld_flag "-B[pwd]/tmpdir/ld/ -Wl,-z,norelro"
# load the linker path
if {[file exists tmpdir/libpath.exp]} {
*************** if ![info exists READELFFLAGS] then {
*** 279,285 ****
}
if ![info exists LD] then {
! set LD [findfile $base_dir/ld-new ./ld-new [transform ld]]
}
if ![info exists LDFLAGS] then {
--- 279,285 ----
}
if ![info exists LD] then {
! set LD "[findfile $base_dir/ld-new ./ld-new [transform ld]] -znorelro"
}
if ![info exists LDFLAGS] then {
diff -upr ../binutils-2.22.52.0.1.orig/ld/testsuite/config/default.exp ld/testsuite/config/default.exp
--- a/ld/testsuite/config/default.exp 2012-03-06 14:00:31.141957656 +0000
+++ b/ld/testsuite/config/default.exp 2012-03-06 14:09:33.492940503 +0000
@@ -23,7 +23,7 @@
#
if ![info exists ld] then {
- set ld [findfile $base_dir/ld-new $base_dir/ld-new [transform ld]]
+ set ld "[findfile $base_dir/ld-new $base_dir/ld-new [transform ld]] -znorelro"
}
if ![info exists as] then {
@@ -60,7 +60,7 @@ if {![file isdirectory tmpdir/ld]} then
catch "exec ln -s ld tmpdir/ld/collect-ld" status
catch "exec ln -s ../../../gas/as-new tmpdir/ld/as" status
}
-set gcc_B_opt "-B[pwd]/tmpdir/ld/"
+set gcc_B_opt "-B[pwd]/tmpdir/ld/ -Wl,-z,norelro"
# load the linker path
set ld_L_opt ""
@@ -279,7 +279,7 @@
}
if ![info exists LD] then {
- set LD [findfile $base_dir/ld-new ./ld-new [transform ld]]
+ set LD "[findfile $base_dir/ld-new ./ld-new [transform ld]] -znorelro"
}
if ![info exists LDFLAGS] then {
diff -cpr ../binutils-2.22.52.0.1.orig/ld/testsuite/ld-bootstrap/bootstrap.exp ld/testsuite/ld-bootstrap/bootstrap.exp
*** ../binutils-2.22.52.0.1.orig/ld/testsuite/ld-bootstrap/bootstrap.exp 2012-03-06 14:00:30.503957676 +0000
--- ld/testsuite/ld-bootstrap/bootstrap.exp 2012-03-06 15:03:33.949837926 +0000
*************** foreach flags {"" "strip" "--static" "--
*** 71,77 ****
# This test can only be run if we have the ld build directory,
# since we need the object files.
! if {$ld != "$objdir/ld-new"} {
untested $testname
continue
}
--- 71,83 ----
# This test can only be run if we have the ld build directory,
# since we need the object files.
! set ldexe $ld
! set ldparm [string first " " $ld]
! if { $ldparm > 0 } then {
! set ldparm [expr $ldparm - 1]
! set ldexe [string range $ld 0 $ldparm]
! }
! if {$ldexe != "$objdir/ld-new"} {
untested $testname
continue
}
*** ../binutils-2.23.2.orig/ld/emultempl/elf32.em 2013-04-24 11:06:47.777176887 +0100
--- ld/emultempl/elf32.em 2013-04-24 11:07:22.405177847 +0100
*************** gld${EMULATION_NAME}_before_parse (void)
*** 105,110 ****
--- 105,111 ----
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;
}
EOF
--- a/ld/testsuite/ld-bootstrap/bootstrap.exp 2012-03-06 14:00:30.503957676 +0000
+++ b/ld/testsuite/ld-bootstrap/bootstrap.exp 2012-03-06 15:03:33.949837926 +0000
@@ -71,7 +71,13 @@
# This test can only be run if we have the ld build directory,
# since we need the object files.
- if {$ld != "$objdir/ld-new"} {
+ set ldexe $ld
+ set ldparm [string first " " $ld]
+ if { $ldparm > 0 } then {
+ set ldparm [expr $ldparm - 1]
+ set ldexe [string range $ld 0 $ldparm]
+ }
+ if {$ldexe != "$objdir/ld-new"} {
untested $testname
continue
}
--- a/ld/emultempl/elf32.em 2013-04-24 11:06:47.777176887 +0100
+++ b/ld/emultempl/elf32.em 2013-04-24 11:07:22.405177847 +0100
@@ -105,6 +105,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;
}
EOF

View File

@ -1,32 +1,28 @@
*** ../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 ----
--- a/bfd/bfd-in.h 2012-08-02 10:56:34.561769686 +0100
+++ b/bfd/bfd-in.h 2012-08-02 11:13:27.134797755 +0100
@@ -25,11 +25,6 @@
#ifndef __BFD_H_SEEN__
#define __BFD_H_SEEN__
-/* PR 14072: Ensure that config.h is included first. */
-#if !defined PACKAGE && !defined PACKAGE_VERSION
-#error config.h must be included before this header
-#endif
-
#ifdef __cplusplus
extern "C" {
#endif
--- a/bfd/bfd-in2.h 2012-08-02 10:56:34.349769680 +0100
+++ b/bfd/bfd-in2.h 2012-08-02 11:13:40.015798113 +0100
@@ -32,11 +32,6 @@
#ifndef __BFD_H_SEEN__
#define __BFD_H_SEEN__
-/* PR 14072: Ensure that config.h is included first. */
-#if !defined PACKAGE && !defined PACKAGE_VERSION
-#error config.h must be included before this header
-#endif
-
#ifdef __cplusplus
extern "C" {
#endif

View File

@ -1,47 +1,26 @@
*** ../binutils-2.23.2.orig/ld/emultempl/aarch64elf.em 2013-06-05 09:46:17.499278813 +0100
--- ld/emultempl/aarch64elf.em 2013-06-05 09:54:36.981292659 +0100
*************** gld${EMULATION_NAME}_after_allocation (v
*** 264,270 ****
}
static void
! gld${EMULATION_NAME}_finish (void)
{
if (! link_info.relocatable)
{
--- 264,270 ----
}
static void
! gld${EMULATION_NAME}_local_finish (void)
{
if (! link_info.relocatable)
{
*************** gld${EMULATION_NAME}_finish (void)
*** 276,282 ****
}
}
! finish_default ();
}
/* This is a convenient point to tell BFD about target specific flags.
--- 276,282 ----
}
}
! gld${EMULATION_NAME}_finish ();
}
/* This is a convenient point to tell BFD about target specific flags.
*************** LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS=
*** 413,416 ****
LDEMUL_BEFORE_PARSE=gld"${EMULATION_NAME}"_before_parse
# Call the extra arm-elf function
! LDEMUL_FINISH=gld${EMULATION_NAME}_finish
--- 413,416 ----
LDEMUL_BEFORE_PARSE=gld"${EMULATION_NAME}"_before_parse
# Call the extra arm-elf function
! LDEMUL_FINISH=gld${EMULATION_NAME}_local_finish
--- a/ld/emultempl/aarch64elf.em 2013-06-05 09:46:17.499278813 +0100
+++ b/ld/emultempl/aarch64elf.em 2013-06-05 09:54:36.981292659 +0100
@@ -264,7 +264,7 @@
}
static void
-gld${EMULATION_NAME}_finish (void)
+gld${EMULATION_NAME}_local_finish (void)
{
if (! link_info.relocatable)
{
@@ -276,7 +276,7 @@
}
}
- finish_default ();
+ gld${EMULATION_NAME}_finish ();
}
/* This is a convenient point to tell BFD about target specific flags.
@@ -413,4 +413,4 @@
LDEMUL_BEFORE_PARSE=gld"${EMULATION_NAME}"_before_parse
# Call the extra arm-elf function
-LDEMUL_FINISH=gld${EMULATION_NAME}_finish
+LDEMUL_FINISH=gld${EMULATION_NAME}_local_finish

File diff suppressed because it is too large Load Diff

View File

@ -1,122 +1,38 @@
*** ../binutils-2.23.52.0.1.orig/bfd/opncls.c 2013-03-14 11:25:30.338306122 +0000
--- bfd/opncls.c 2013-03-14 12:20:21.686397360 +0000
*************** find_separate_debug_file (bfd *abfd, con
*** 1297,1302 ****
--- 1297,1304 ----
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)
*************** find_separate_debug_file (bfd *abfd, con
*** 1332,1337 ****
--- 1334,1359 ----
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;
*** ../binutils-2.23.52.0.1.orig/bfd/dwarf2.c 2013-03-14 11:25:30.608306129 +0000
--- bfd/dwarf2.c 2013-03-14 13:14:18.102487075 +0000
*************** find_line (bfd *abfd,
*** 3339,3346 ****
--- 3339,3349 ----
struct dwarf2_debug *stash;
/* What address are we looking for? */
bfd_vma addr;
+ /* What is the address without relocation ? */
+ bfd_vma unrelocated_addr;
struct comp_unit* each;
bfd_vma found = FALSE;
+ bfd_vma possible_find = FALSE;
bfd_boolean do_line;
*filename_ptr = NULL;
*************** find_line (bfd *abfd,
*** 3380,3385 ****
--- 3383,3394 ----
else
abort ();
+ /* If we are dealing with PIC code then the debug information
+ will be based on unrelocated addresses. Since we cannot be
+ sure if this is a PIC address we test both with and without
+ relocation. */
+ unrelocated_addr = addr;
+
if (section->output_section)
addr += section->output_section->vma + section->output_offset;
else
*************** find_line (bfd *abfd,
*** 3442,3447 ****
--- 3451,3466 ----
stash));
if (found)
goto done;
+
+ if (! possible_find)
+ possible_find = ((each->arange.high == 0
+ || comp_unit_contains_address (each, unrelocated_addr))
+ && comp_unit_find_nearest_line (each, unrelocated_addr,
+ filename_ptr,
+ functionname_ptr,
+ linenumber_ptr,
+ discriminator_ptr,
+ stash));
}
}
*************** find_line (bfd *abfd,
*** 3535,3540 ****
--- 3554,3569 ----
discriminator_ptr,
stash));
+ if (! found && ! do_line && ! possible_find)
+ possible_find = ((each->arange.high == 0
+ || comp_unit_contains_address (each, unrelocated_addr))
+ && comp_unit_find_nearest_line (each, unrelocated_addr,
+ filename_ptr,
+ functionname_ptr,
+ linenumber_ptr,
+ discriminator_ptr,
+ stash));
+
if ((bfd_vma) (stash->info_ptr - stash->sec_info_ptr)
== stash->sec->size)
{
*************** find_line (bfd *abfd,
*** 3552,3557 ****
--- 3581,3588 ----
if ((abfd->flags & (EXEC_P | DYNAMIC)) == 0)
unset_sections (stash);
+ if (! found)
+ return possible_find;
return found;
}
--- 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;

View File

@ -1,44 +0,0 @@
*** ../binutils-2.24.orig/bfd/dwarf2.c 2014-01-28 11:58:02.072737296 +0000
--- bfd/dwarf2.c 2014-01-28 11:59:38.575739971 +0000
*************** find_abstract_instance_name (struct comp
*** 2126,2131 ****
--- 2126,2153 ----
abort ();
info_ptr = unit->sec_info_ptr + die_ref;
+
+ /* Now find the CU containing this pointer. */
+ if (info_ptr >= unit->info_ptr_unit && info_ptr < unit->end_ptr)
+ ;
+ else
+ {
+ /* Check other CUs to see if they contain the abbrev. */
+ struct comp_unit * u;
+
+ for (u = unit->prev_unit; u != NULL; u = u->prev_unit)
+ if (info_ptr >= u->info_ptr_unit && info_ptr < u->end_ptr)
+ break;
+
+ if (u == NULL)
+ for (u = unit->next_unit; u != NULL; u = u->next_unit)
+ if (info_ptr >= u->info_ptr_unit && info_ptr < u->end_ptr)
+ break;
+
+ if (u)
+ unit = u;
+ /* else FIXME: What do we do now ? */
+ }
}
else if (attr_ptr->form == DW_FORM_GNU_ref_alt)
{
*************** find_abstract_instance_name (struct comp
*** 2137,2142 ****
--- 2159,2166 ----
bfd_set_error (bfd_error_bad_value);
return name;
}
+ /* FIXME: Do we need to locate the correct CU, in a similar
+ fashion to the code in the DW_FORM_ref_addr case above ? */
}
else
info_ptr = unit->info_ptr_unit + die_ref;

View File

@ -1,54 +0,0 @@
commit f44a1f8e513b37bcc52ba9ea0c172c3e94852756
Author: Christophe Lyon <christophe.lyon@st.com>
Date: Tue Jan 14 15:53:50 2014 +0100
2014-01-14 Michael Hudson-Doyle <michael.hudson@linaro.org>
Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
bfd/
* elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use correct
offset while calculating relocation address.
(elfNN_aarch64_create_small_pltn_entry): Likewise.
(elfNN_aarch64_init_small_plt0_entry): Likewise.
--- a/bfd/elfnn-aarch64.c
+++ b/bfd/elfnn-aarch64.c
@@ -3844,7 +3844,7 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto,
value = (symbol_got_offset (input_bfd, h, r_symndx)
+ globals->root.sgot->output_section->vma
- + globals->root.sgot->output_section->output_offset);
+ + globals->root.sgot->output_offset);
value = _bfd_aarch64_elf_resolve_relocation (bfd_r_type, place, value,
0, weak_undef_p);
@@ -3873,10 +3873,9 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto,
case BFD_RELOC_AARCH64_TLSDESC_LDR:
if (globals->root.sgot == NULL)
return bfd_reloc_notsupported;
-
value = (symbol_tlsdesc_got_offset (input_bfd, h, r_symndx)
+ globals->root.sgotplt->output_section->vma
- + globals->root.sgotplt->output_section->output_offset
+ + globals->root.sgotplt->output_offset
+ globals->sgotplt_jump_table_size);
value = _bfd_aarch64_elf_resolve_relocation (bfd_r_type, place, value,
@@ -6627,7 +6626,7 @@ elfNN_aarch64_create_small_pltn_entry (struct elf_link_hash_entry *h,
plt_entry = plt->contents + h->plt.offset;
plt_entry_address = plt->output_section->vma
- + plt->output_section->output_offset + h->plt.offset;
+ + plt->output_offset + h->plt.offset;
gotplt_entry_address = gotplt->output_section->vma +
gotplt->output_offset + got_offset;
@@ -6934,7 +6933,7 @@ elfNN_aarch64_init_small_plt0_entry (bfd *output_bfd ATTRIBUTE_UNUSED,
+ GOT_ENTRY_SIZE * 2);
plt_base = htab->root.splt->output_section->vma +
- htab->root.splt->output_section->output_offset;
+ htab->root.splt->output_offset;
/* Fill in the top 21 bits for this: ADRP x16, PLT_GOT + n * 8.
ADRP: ((PG(S+A)-PG(P)) >> 12) & 0x1fffff */

View File

@ -1,103 +0,0 @@
commit 67428c4aa56d4183d0f531e0d752040745a94423
Author: Will Newton <will.newton@linaro.org>
Date: Mon Nov 25 11:07:07 2013 +0000
bfd/elfnn-aarch64.c: Fix miscalculation of GOTPLT offset for ifunc syms.
The .got.plt header size was not being correctly taken into account
when calculating the offset for relocations against ifunc symbols.
bfd/ChangeLog:
2013-11-26 Will Newton <will.newton@linaro.org>
* elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Ensure
PLT_INDEX is calculated using correct header size.
ld/testsuite/ChangeLog:
2013-11-26 Will Newton <will.newton@linaro.org>
* ld-aarch64/aarch64-elf.exp: Add ifunc-21 test.
* ld-aarch64/ifunc-21.d: New file.
* ld-aarch64/ifunc-21.s: Likewise.
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
index 6bc414e..3cd3a18 100644
--- a/bfd/elfnn-aarch64.c
+++ b/bfd/elfnn-aarch64.c
@@ -3589,7 +3589,8 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto,
if (globals->root.splt != NULL)
{
- plt_index = h->plt.offset / globals->plt_entry_size - 1;
+ plt_index = ((h->plt.offset - globals->plt_header_size) /
+ globals->plt_entry_size);
off = (plt_index + 3) * GOT_ENTRY_SIZE;
base_got = globals->root.sgotplt;
}
diff --git a/ld/testsuite/ld-aarch64/aarch64-elf.exp b/ld/testsuite/ld-aarch64/aarch64-elf.exp
index 5c150dd..a6b3ea2 100644
--- a/ld/testsuite/ld-aarch64/aarch64-elf.exp
+++ b/ld/testsuite/ld-aarch64/aarch64-elf.exp
@@ -155,3 +155,4 @@ run_dump_test "ifunc-18b"
run_dump_test "ifunc-19a"
run_dump_test "ifunc-19b"
run_dump_test "ifunc-20"
+run_dump_test "ifunc-21"
diff --git a/ld/testsuite/ld-aarch64/ifunc-21.d b/ld/testsuite/ld-aarch64/ifunc-21.d
new file mode 100644
index 0000000..fa139b2
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/ifunc-21.d
@@ -0,0 +1,31 @@
+#source: ifunc-21.s
+#ld: -shared -z nocombreloc
+#objdump: -d -s -j .got.plt -j .text
+#target: aarch64*-*-*
+
+# Ensure the .got.plt slot used is correct
+
+.*: file format elf64-(little|big)aarch64
+
+Contents of section .text:
+ 02a0 .*
+Contents of section .got.plt:
+ 103a8 0+ 0+ 0+ 0+ .*
+ 103b8 0+ 0+ [0-9a-f]+ 0+ .*
+
+Disassembly of section .text:
+
+0+2a0 <ifunc>:
+ 2a0: d65f03c0 ret
+
+0+2a4 <bar>:
+ 2a4: 90000080 adrp x0, 10000 <.*>
+ 2a8: f941e000 ldr x0, \[x0,#960\]
+ 2ac: d65f03c0 ret
+
+Disassembly of section .got.plt:
+
+.*:
+.*
+.*
+.*
diff --git a/ld/testsuite/ld-aarch64/ifunc-21.s b/ld/testsuite/ld-aarch64/ifunc-21.s
new file mode 100644
index 0000000..a1563dc
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/ifunc-21.s
@@ -0,0 +1,13 @@
+ .text
+ .type ifunc, @gnu_indirect_function
+ .hidden ifunc
+ifunc:
+ ret
+ .size ifunc, .-ifunc
+ .type bar, @function
+ .globl bar
+bar:
+ adrp x0, :got:ifunc
+ ldr x0, [x0, #:got_lo12:ifunc]
+ ret
+ .size bar, .-bar

View File

@ -1,40 +0,0 @@
commit 44f814ce5066f10a3bed29c45d10e0d38f4fa433
Author: Marcus Shawcroft <marcus.shawcroft@arm.com>
Date: Tue Apr 15 17:46:07 2014 +0100
[AArch64] Fix off by one error in instruction relaxation mask.
The AArch64 TLSDESC to IE relaxation code uses a bit mask intended to
ensure that destination register in a relaxed ldr instruction is
always X0. The mask has an off by one error resulting in the most
significant bit of the destination register being retained in the
relaxed instruction. The issue generally appears when the compiler
emits TLS accesses code under high register pressure resulting in a
broken code sequence.
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
index 42c83fb..8503419 100644
--- a/bfd/elfnn-aarch64.c
+++ b/bfd/elfnn-aarch64.c
@@ -3957,7 +3957,7 @@ elfNN_aarch64_tls_relax (struct elf_aarch64_link_hash_table *globals,
ldr xd, [x0, #:tlsdesc_lo12:var] => ldr x0, [x0, #:gottprel_lo12:var]
*/
insn = bfd_getl32 (contents + rel->r_offset);
- insn &= 0xfffffff0;
+ insn &= 0xffffffe0;
bfd_putl32 (insn, contents + rel->r_offset);
return bfd_reloc_continue;
}
diff --git a/ld/testsuite/ld-aarch64/tls-relax-gdesc-ie.s b/ld/testsuite/ld-aarch64/tls-relax-gdesc-ie.s
index c20690c..38b3721 100644
--- a/ld/testsuite/ld-aarch64/tls-relax-gdesc-ie.s
+++ b/ld/testsuite/ld-aarch64/tls-relax-gdesc-ie.s
@@ -4,7 +4,7 @@ var:
.word 2
.text
adrp x0, :tlsdesc:var
- ldr x1, [x0, #:tlsdesc_lo12:var]
+ ldr x17, [x0, #:tlsdesc_lo12:var]
add x0, x0, :tlsdesc_lo12:var
.tlsdesccall var
blr x1

View File

@ -1,118 +0,0 @@
commit 14d96265dd8fd934d868c0b8e1991e2fefbe9fc8
Author: Will Newton <will.newton@linaro.org>
Date: Mon Nov 25 14:44:59 2013 +0000
bfd/elfnn-aarch64.c: Handle static links with ifunc correctly.
The code for handling GOT references to ifunc symbols in static links
was missing.
bfd/ChangeLog:
2013-11-26 Will Newton <will.newton@linaro.org>
* elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol):
Handle STT_GNU_IFUNC symbols correctly in static links.
ld/testsuite/ChangeLog:
2013-11-26 Will Newton <will.newton@linaro.org>
* ld-aarch64/aarch64-elf.exp: Add ifunc-22.
* ld-aarch64/ifunc-22.d: New file.
* ld-aarch64/ifunc-22.s: Likewise.
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
index 3cd3a18..9053635 100644
--- a/bfd/elfnn-aarch64.c
+++ b/bfd/elfnn-aarch64.c
@@ -6824,7 +6824,34 @@ elfNN_aarch64_finish_dynamic_symbol (bfd *output_bfd,
+ htab->root.sgot->output_offset
+ (h->got.offset & ~(bfd_vma) 1));
- if (info->shared && SYMBOL_REFERENCES_LOCAL (info, h))
+ if (h->def_regular
+ && h->type == STT_GNU_IFUNC)
+ {
+ if (info->shared)
+ {
+ /* Generate R_AARCH64_GLOB_DAT. */
+ goto do_glob_dat;
+ }
+ else
+ {
+ asection *plt;
+
+ if (!h->pointer_equality_needed)
+ abort ();
+
+ /* For non-shared object, we can't use .got.plt, which
+ contains the real function address if we need pointer
+ equality. We load the GOT entry with the PLT entry. */
+ plt = htab->root.splt ? htab->root.splt : htab->root.iplt;
+ bfd_put_NN (output_bfd, (plt->output_section->vma
+ + plt->output_offset
+ + h->plt.offset),
+ htab->root.sgot->contents
+ + (h->got.offset & ~(bfd_vma) 1));
+ return TRUE;
+ }
+ }
+ else if (info->shared && SYMBOL_REFERENCES_LOCAL (info, h))
{
if (!h->def_regular)
return FALSE;
@@ -6837,6 +6864,7 @@ elfNN_aarch64_finish_dynamic_symbol (bfd *output_bfd,
}
else
{
+do_glob_dat:
BFD_ASSERT ((h->got.offset & 1) == 0);
bfd_put_NN (output_bfd, (bfd_vma) 0,
htab->root.sgot->contents + h->got.offset);
diff --git a/ld/testsuite/ld-aarch64/aarch64-elf.exp b/ld/testsuite/ld-aarch64/aarch64-elf.exp
index a6b3ea2..692bf34 100644
--- a/ld/testsuite/ld-aarch64/aarch64-elf.exp
+++ b/ld/testsuite/ld-aarch64/aarch64-elf.exp
@@ -156,3 +156,4 @@ run_dump_test "ifunc-19a"
run_dump_test "ifunc-19b"
run_dump_test "ifunc-20"
run_dump_test "ifunc-21"
+run_dump_test "ifunc-22"
diff --git a/ld/testsuite/ld-aarch64/ifunc-22.d b/ld/testsuite/ld-aarch64/ifunc-22.d
new file mode 100644
index 0000000..f28b039
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/ifunc-22.d
@@ -0,0 +1,11 @@
+#source: ifunc-22.s
+#objdump: -s -j .got
+#ld: -static
+#target: aarch64*-*-*
+
+# Ensure GOT is populated correctly in static link
+
+.*: file format elf64-(little|big)aarch64
+
+Contents of section \.got:
+ 4100f0 00000000 00000000 d0004000 00000000 ..........@.....
diff --git a/ld/testsuite/ld-aarch64/ifunc-22.s b/ld/testsuite/ld-aarch64/ifunc-22.s
new file mode 100644
index 0000000..69a87bb
--- /dev/null
+++ b/ld/testsuite/ld-aarch64/ifunc-22.s
@@ -0,0 +1,14 @@
+ .text
+ .type ifunc, @gnu_indirect_function
+ .global ifunc
+ifunc:
+ ret
+ .size ifunc, .-ifunc
+ .type _start, @function
+ .globl _start
+_start:
+ adrp x0, :got:ifunc
+ ldr x0, [x0, #:got_lo12:ifunc]
+ .size _start, .-_start
+ .data
+ .xword ifunc

View File

@ -1,55 +0,0 @@
commit 273dc279306c2b69fbc1407cc695397e4b015152
Author: Will Newton <will.newton@linaro.org>
Date: Fri May 16 15:22:58 2014 +0100
ld/aarch64: xfail non-PIC shared object tests on aarch64
aarch64 does not support building non-PIC shared objects, so mark
tests for these as xfail.
ld/testsuite/ChangeLog:
2014-05-20 Will Newton <will.newton@linaro.org>
* ld-shared/shared.exp: Mark non-PIC shared object tests
as xfail on aarch64.
#-- a/ld/testsuite/ChangeLog
#++ b/ld/testsuite/ChangeLog
#@ -1,3 +1,8 @@
+2014-05-20 Will Newton <will.newton@linaro.org>
+
+ * ld-shared/shared.exp: Mark non-PIC shared object tests
+ as xfail on aarch64.
+
2014-05-19 Andreas Tobler <andreast@fgznet.ch>
* ld-elf/shared.exp: Introduce the extralibs variable to control
diff --git a/ld/testsuite/ld-shared/shared.exp b/ld/testsuite/ld-shared/shared.exp
index 9996ece..c723ef7 100644
--- a/ld/testsuite/ld-shared/shared.exp
+++ b/ld/testsuite/ld-shared/shared.exp
@@ -244,6 +244,7 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o]
if [ string match $shared_needs_pic "yes" ] {
setup_xfail "arm*-*-linux*"
}
+ setup_xfail "aarch64*-*-linux*"
shared_test shnp "shared (non PIC)" mainnp.o sh1np.o sh2np.o shared
# Test ELF shared library relocations with a non-zero load
@@ -270,6 +271,7 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o]
if [ string match $shared_needs_pic "yes" ] {
setup_xfail "arm*-*-linux*"
}
+ setup_xfail "aarch64*-*-linux*"
shared_test shnp "shared (non PIC, load offset)" \
mainnp.o sh1np.o sh2np.o shared \
"-T $srcdir/$subdir/elf-offset.ld"
@@ -326,6 +328,7 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG $picflag" $srcdir/$subdir/main.c $tmpdir/m
if [ string match $shared_needs_pic "yes" ] {
setup_xfail "arm*-*-linux*"
}
+ setup_xfail "aarch64*-*-linux*"
shared_test shmpnp "shared (PIC main, non PIC so)" mainp.o sh1np.o sh2np.o shared
}
} else {

View File

@ -1,42 +0,0 @@
commit eea6dad2b3ae91189caa91145dd133bae0398d21
Author: Kyle McMartin <kyle@redhat.com>
Date: Fri Jun 20 11:14:09 2014 +0100
Similarly to the AArch64 patch, set DF_STATIC_TLS for consistency with
other architectures when we emit IE relocs in a shared library.
* elf32-arm.c (elf32_arm_check_relocs): Set DF_STATIC_TLS when
emitting initial-exec relocs when not linking an executable.
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -12711,6 +12711,9 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info,
default: tls_type = GOT_NORMAL; break;
}
+ if (!info->executable && (tls_type & GOT_TLS_IE))
+ info->flags |= DF_STATIC_TLS;
+
if (h != NULL)
{
h->got.refcount++;
--- a/ld/testsuite/ld-arm/tls-gdierelax2.d
+++ b/ld/testsuite/ld-arm/tls-gdierelax2.d
@@ -11,13 +11,13 @@ Disassembly of section .text:
[0-9a-f]+: e59f0004 ldr r0, \[pc, #4\] ; .*
[0-9a-f]+: e79f0000 ldr r0, \[pc, r0\]
[0-9a-f]+: e1a00000 nop ; .*
- [0-9a-f]+: 00008098 .word 0x00008098
- [0-9a-f]+: 0000809c .word 0x0000809c
+ [0-9a-f]+: 000080a0 .word 0x000080a0
+ [0-9a-f]+: 000080a4 .word 0x000080a4
[0-9a-f]+ <bar>:
[0-9a-f]+: 4801 ldr r0, \[pc, #4\] ; .*
[0-9a-f]+: 4478 add r0, pc
[0-9a-f]+: 6800 ldr r0, \[r0, #0\]
[0-9a-f]+: 46c0 nop ; .*
- [0-9a-f]+: 0000808a .word 0x0000808a
- [0-9a-f]+: 0000808c .word 0x0000808c
+ [0-9a-f]+: 00008092 .word 0x00008092
+ [0-9a-f]+: 00008094 .word 0x00008094

View File

@ -1,199 +0,0 @@
diff -cpr ../binutils-2.24.orig/bfd/archive.c ./bfd/archive.c
*** ../binutils-2.24.orig/bfd/archive.c 2014-11-13 11:08:46.720741346 +0000
--- ./bfd/archive.c 2014-11-13 11:12:38.908876606 +0000
*************** _bfd_slurp_extended_name_table (bfd *abf
*** 1299,1304 ****
--- 1299,1306 ----
{
byebye:
free (namedata);
+ bfd_ardata (abfd)->extended_names = NULL;
+ bfd_ardata (abfd)->extended_names_size = 0;
return FALSE;
}
diff -cpr ../binutils-2.24.orig/binutils/ar.c ./binutils/ar.c
*** ../binutils-2.24.orig/binutils/ar.c 2014-11-13 11:08:46.808741776 +0000
--- ./binutils/ar.c 2014-11-13 11:10:10.510151199 +0000
*************** extract_file (bfd *abfd)
*** 1031,1036 ****
--- 1031,1045 ----
bfd_size_type size;
struct stat buf;
+ /* PR binutils/17533: Do not allow directory traversal
+ outside of the current directory tree. */
+ if (! is_valid_archive_path (bfd_get_filename (abfd)))
+ {
+ non_fatal (_("illegal pathname found in archive member: %s"),
+ bfd_get_filename (abfd));
+ return;
+ }
+
if (bfd_stat_arch_elt (abfd, &buf) != 0)
/* xgettext:c-format */
fatal (_("internal stat error on %s"), bfd_get_filename (abfd));
Only in ./binutils: ar.c.orig
diff -cpr ../binutils-2.24.orig/binutils/bucomm.c ./binutils/bucomm.c
*** ../binutils-2.24.orig/binutils/bucomm.c 2014-11-13 11:08:46.791741693 +0000
--- ./binutils/bucomm.c 2014-11-13 11:10:10.511151188 +0000
*************** bfd_get_archive_filename (const bfd *abf
*** 624,626 ****
--- 624,652 ----
bfd_get_filename (abfd));
return buf;
}
+
+ /* Returns TRUE iff PATHNAME, a filename of an archive member,
+ is valid for writing. For security reasons absolute paths
+ and paths containing /../ are not allowed. See PR 17533. */
+
+ bfd_boolean
+ is_valid_archive_path (char const * pathname)
+ {
+ const char * n = pathname;
+
+ if (IS_ABSOLUTE_PATH (n))
+ return FALSE;
+
+ while (*n)
+ {
+ if (*n == '.' && *++n == '.' && ( ! *++n || IS_DIR_SEPARATOR (*n)))
+ return FALSE;
+
+ while (*n && ! IS_DIR_SEPARATOR (*n))
+ n++;
+ while (IS_DIR_SEPARATOR (*n))
+ n++;
+ }
+
+ return TRUE;
+ }
diff -cpr ../binutils-2.24.orig/binutils/bucomm.h ./binutils/bucomm.h
*** ../binutils-2.24.orig/binutils/bucomm.h 2014-11-13 11:08:46.798741727 +0000
--- ./binutils/bucomm.h 2014-11-13 11:10:10.511151188 +0000
*************** bfd_vma parse_vma (const char *, const c
*** 58,63 ****
--- 58,65 ----
off_t get_file_size (const char *);
+ bfd_boolean is_valid_archive_path (char const *);
+
extern char *program_name;
/* filemode.c */
diff -cpr ../binutils-2.24.orig/binutils/doc/binutils.texi ./binutils/doc/binutils.texi
*** ../binutils-2.24.orig/binutils/doc/binutils.texi 2014-11-13 11:08:46.955742495 +0000
--- ./binutils/doc/binutils.texi 2014-11-13 11:10:10.513151165 +0000
*************** a normal archive. Instead the elements
*** 234,240 ****
individually to the second archive.
The paths to the elements of the archive are stored relative to the
! archive itself.
@cindex compatibility, @command{ar}
@cindex @command{ar} compatibility
--- 234,241 ----
individually to the second archive.
The paths to the elements of the archive are stored relative to the
! archive itself. For security reasons absolute paths and paths with a
! @code{/../} component are not allowed.
@cindex compatibility, @command{ar}
@cindex @command{ar} compatibility
diff -cpr ../binutils-2.24.orig/binutils/objcopy.c ./binutils/objcopy.c
*** ../binutils-2.24.orig/binutils/objcopy.c 2014-11-13 11:08:46.798741727 +0000
--- ./binutils/objcopy.c 2014-11-13 11:10:10.514151156 +0000
*************** copy_archive (bfd *ibfd, bfd *obfd, cons
*** 2182,2187 ****
--- 2182,2197 ----
bfd_boolean del = TRUE;
bfd_boolean ok_object;
+ /* PR binutils/17533: Do not allow directory traversal
+ outside of the current directory tree by archive members. */
+ if (! is_valid_archive_path (bfd_get_filename (this_element)))
+ {
+ non_fatal (_("illegal pathname found in archive member: %s"),
+ bfd_get_filename (this_element));
+ status = 1;
+ goto cleanup_and_exit;
+ }
+
/* Create an output file for this member. */
output_name = concat (dir, "/",
bfd_get_filename (this_element), (char *) 0);
*************** copy_archive (bfd *ibfd, bfd *obfd, cons
*** 2191,2198 ****
{
output_name = make_tempdir (output_name);
if (output_name == NULL)
! fatal (_("cannot create tempdir for archive copying (error: %s)"),
! strerror (errno));
l = (struct name_list *) xmalloc (sizeof (struct name_list));
l->name = output_name;
--- 2201,2212 ----
{
output_name = make_tempdir (output_name);
if (output_name == NULL)
! {
! non_fatal (_("cannot create tempdir for archive copying (error: %s)"),
! strerror (errno));
! status = 1;
! goto cleanup_and_exit;
! }
l = (struct name_list *) xmalloc (sizeof (struct name_list));
l->name = output_name;
*************** copy_archive (bfd *ibfd, bfd *obfd, cons
*** 2234,2240 ****
{
bfd_nonfatal_message (output_name, NULL, NULL, NULL);
status = 1;
! return;
}
if (ok_object)
--- 2248,2254 ----
{
bfd_nonfatal_message (output_name, NULL, NULL, NULL);
status = 1;
! goto cleanup_and_exit;
}
if (ok_object)
*************** copy_archive (bfd *ibfd, bfd *obfd, cons
*** 2295,2301 ****
{
status = 1;
bfd_nonfatal_message (filename, NULL, NULL, NULL);
- return;
}
filename = bfd_get_filename (ibfd);
--- 2309,2314 ----
*************** copy_archive (bfd *ibfd, bfd *obfd, cons
*** 2303,2311 ****
{
status = 1;
bfd_nonfatal_message (filename, NULL, NULL, NULL);
- return;
}
/* Delete all the files that we opened. */
for (l = list; l != NULL; l = l->next)
{
--- 2316,2324 ----
{
status = 1;
bfd_nonfatal_message (filename, NULL, NULL, NULL);
}
+ cleanup_and_exit:
/* Delete all the files that we opened. */
for (l = list; l != NULL; l = l->next)
{

File diff suppressed because it is too large Load Diff

View File

@ -1,21 +0,0 @@
*** ../binutils-2.24.orig/bfd/elfnn-aarch64.c 2013-12-17 11:16:28.723807381 +0000
--- bfd/elfnn-aarch64.c 2013-12-17 11:18:13.517804067 +0000
*************** _aarch64_elf_section_data;
*** 1679,1686 ****
#define elf_aarch64_section_data(sec) \
((_aarch64_elf_section_data *) elf_section_data (sec))
! /* The size of the thread control block. */
! #define TCB_SIZE 16
struct elf_aarch64_local_symbol
{
--- 1679,1686 ----
#define elf_aarch64_section_data(sec) \
((_aarch64_elf_section_data *) elf_section_data (sec))
! /* The size of the thread control block which is defined to be two pointers. */
! #define TCB_SIZE (ARCH_SIZE/8)*2
struct elf_aarch64_local_symbol
{

View File

@ -1,30 +0,0 @@
*** ../binutils-2.24.orig/bfd/compress.c 2014-04-28 16:35:20.429816317 +0100
--- bfd/compress.c 2014-04-28 16:36:06.450963028 +0100
***************
*** 25,30 ****
--- 25,31 ----
#ifdef HAVE_ZLIB_H
#include <zlib.h>
#endif
+ #include "safe-ctype.h"
#ifdef HAVE_ZLIB_H
static bfd_boolean
*************** bfd_is_section_compressed (bfd *abfd, se
*** 304,309 ****
--- 305,319 ----
compressed = (bfd_get_section_contents (abfd, sec, compressed_buffer, 0, 12)
&& CONST_STRNEQ ((char*) compressed_buffer, "ZLIB"));
+ /* Check for the pathalogical case of a debug string section that
+ contains the string ZLIB.... as the first entry. We assume that
+ no uncompressed .debug_str section would ever be big enough to
+ have the first byte of its (big-endian) size be non-zero. */
+ if (compressed
+ && strcmp (sec->name, ".debug_str") == 0
+ && ISPRINT (compressed_buffer[4]))
+ compressed = FALSE;
+
/* Restore compress_status. */
sec->compress_status = saved;
return compressed;

View File

@ -1,57 +0,0 @@
commit b35d44f1af711925bfa4344ef00470fee67122f1
Author: Kyrylo Tkachov <kyrylo.tkachov@arm.com>
Date: Wed Nov 27 13:43:39 2013 +0000
[ld/testsuite/]
2013-11-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* ld-plugin/lto.exp: Add -ffat-lto-objects.
* lib/ld-lib.exp (check_lto_available): Likewise.
--- a/ld/testsuite/ld-plugin/lto.exp
+++ b/ld/testsuite/ld-plugin/lto.exp
@@ -57,7 +57,7 @@ set lto_link_tests {
"" "-O2"
{lto-3c.c} {} "libdummy.a"}
{"Build liblto-3.a"
- "" "-flto"
+ "" "-flto -ffat-lto-objects"
{lto-3b.c} {} "liblto-3.a"}
{"Build libdummy.a 5a"
"" "-flto"
@@ -111,7 +111,7 @@ set lto_link_tests {
"" ""
{pr12758a.s} {} "libdummy.a"}
{"Build libpr12758.a"
- "" "-flto -O2"
+ "" "-flto -O2 -ffat-lto-objects"
{pr12758b.c} {} "libpr12758.a"}
{"PR ld/12758"
"-O2 -Wl,-e,foo -nostdlib -flto -fuse-linker-plugin tmpdir/pr12758a.o -Wl,--start-group tmpdir/libpr12758.a -Wl,--end-group" ""
@@ -120,13 +120,13 @@ set lto_link_tests {
"" ""
{pr12760a.c} {} "libdummy.a"}
{"Build libpr12760.a"
- "" "-flto -O2"
+ "" "-flto -O2 -ffat-lto-objects"
{pr12760b.c} {} "libpr12760.a"}
{"PR ld/12760"
"-O2 -Wl,-e,foo -nostdlib -flto -fuse-linker-plugin tmpdir/pr12760a.o -Wl,--start-group tmpdir/libpr12760.a -Wl,--end-group" ""
{dummy.c} {} "pr12760.exe" "c" "warning: Bad bar"}
{"Build libpr13183.a"
- "-T" "-flto -O2"
+ "-T" "-flto -O2 -ffat-lto-objects"
{pr13183a.c} {} "libpr13183.a"}
{"Build libdummy.a PR ld/13183"
"" "-flto -O2"
--- a/ld/testsuite/lib/ld-lib.exp
+++ b/ld/testsuite/lib/ld-lib.exp
@@ -1643,7 +1643,7 @@ proc check_lto_available { } {
set f [open $src "w"]
puts $f ""
close $f
- set status [remote_exec host $CC "-shared -B[pwd]/tmpdir/ld/ -flto -fuse-linker-plugin $src -o $output"]
+ set status [remote_exec host $CC "-shared -B[pwd]/tmpdir/ld/ -flto -ffat-lto-objects -fuse-linker-plugin $src -o $output"]
if { [lindex $status 0] == 0 } {
set lto_available_saved 1
} else {

View File

@ -1,28 +0,0 @@
*** ../binutils-2.24.orig/bfd/elflink.c 2014-08-21 09:17:27.753408085 +0100
--- bfd/elflink.c 2014-08-21 10:04:52.174935912 +0100
*************** _bfd_elf_add_default_symbol (bfd *abfd,
*** 1705,1710 ****
--- 1705,1716 ----
ht = (struct elf_link_hash_entry *) hi->root.u.i.link;
(*bed->elf_backend_copy_indirect_symbol) (info, ht, hi);
+ /* A reference to the SHORTNAME symbol from a dynamic library
+ will be satisfied by the versioned symbol at runtime. In
+ effect, we have a reference to the versioned symbol. */
+ ht->ref_dynamic_nonweak |= hi->ref_dynamic_nonweak;
+ hi->dynamic_def |= ht->dynamic_def;
+
/* See if the new flags lead us to realize that the symbol must
be dynamic. */
if (! *dynsym)
*************** nondefault:
*** 1774,1779 ****
--- 1780,1787 ----
if (hi->root.type == bfd_link_hash_indirect)
{
(*bed->elf_backend_copy_indirect_symbol) (info, h, hi);
+ h->ref_dynamic_nonweak |= hi->ref_dynamic_nonweak;
+ hi->dynamic_def |= h->dynamic_def;
/* See if the new flags lead us to realize that the symbol
must be dynamic. */

View File

@ -1,54 +1,50 @@
Common subdirectories: ../binutils-2.24.orig/ld/emulparams and ld/emulparams
Common subdirectories: ../binutils-2.24.orig/ld/emultempl and ld/emultempl
diff -cp ../binutils-2.24.orig/ld/ldlang.c ld/ldlang.c
*** ../binutils-2.24.orig/ld/ldlang.c 2014-05-09 10:35:04.589504928 +0100
--- ld/ldlang.c 2014-05-09 10:35:55.515661478 +0100
*************** lang_add_output_format (const char *form
*** 7096,7101 ****
--- 7096,7113 ----
&& little != NULL)
format = little;
+ if (getenv ("LD_FORCE_LE") != NULL)
+ {
+ if (strcmp (format, "elf64-powerpc") == 0)
+ format = "elf64-powerpcle";
+ else if (strcmp (format, "elf32-powerpc") == 0)
+ format = "elf32-powerpcle";
+ else if (strcmp (format, "elf64-big") == 0)
+ format = "elf64-little";
+ else if (strcmp (format, "elf32-big") == 0)
+ format = "elf32-little";
+ }
+
output_target = format;
}
}
diff -up ../binutils-2.24.orig/ld/ldlang.c ld/ldlang.c
--- a/ld/ldlang.c 2014-05-09 10:35:04.589504928 +0100
+++ b/ld/ldlang.c 2014-05-09 10:35:55.515661478 +0100
@@ -7096,6 +7096,18 @@
&& little != NULL)
format = little;
+ if (getenv ("LD_FORCE_LE") != NULL)
+ {
+ if (strcmp (format, "elf64-powerpc") == 0)
+ format = "elf64-powerpcle";
+ else if (strcmp (format, "elf32-powerpc") == 0)
+ format = "elf32-powerpcle";
+ else if (strcmp (format, "elf64-big") == 0)
+ format = "elf64-little";
+ else if (strcmp (format, "elf32-big") == 0)
+ format = "elf32-little";
+ }
+
output_target = format;
}
}
Only in ld: ldlang.c.orig
diff -cp ../binutils-2.24.orig/ld/ldmain.c ld/ldmain.c
*** ../binutils-2.24.orig/ld/ldmain.c 2014-05-09 10:35:04.593504941 +0100
--- ld/ldmain.c 2014-05-09 10:35:55.515661478 +0100
*************** get_emulation (int argc, char **argv)
*** 603,608 ****
--- 603,620 ----
}
}
+ if ((strncmp (emulation, "elf64ppc", 8) == 0
+ || strncmp (emulation, "elf32ppc", 8) == 0)
+ && getenv ("LD_FORCE_LE") != NULL)
+ {
+ size_t len = strlen (emulation);
+ char *le = xmalloc (len + 2);
+ memcpy (le, emulation, 5);
+ le[5] = 'l';
+ memcpy (le + 6, emulation + 5, len - 4);
+ emulation = le;
+ }
+
return emulation;
}
diff -up ../binutils-2.24.orig/ld/ldmain.c ld/ldmain.c
--- a/ld/ldmain.c 2014-05-09 10:35:04.593504941 +0100
+++ b/ld/ldmain.c 2014-05-09 10:35:55.515661478 +0100
@@ -603,6 +603,18 @@
}
}
+ if ((strncmp (emulation, "elf64ppc", 8) == 0
+ || strncmp (emulation, "elf32ppc", 8) == 0)
+ && getenv ("LD_FORCE_LE") != NULL)
+ {
+ size_t len = strlen (emulation);
+ char *le = xmalloc (len + 2);
+ memcpy (le, emulation, 5);
+ le[5] = 'l';
+ memcpy (le + 6, emulation + 5, len - 4);
+ emulation = le;
+ }
+
return emulation;
}
Only in ld: ldmain.c.orig
Common subdirectories: ../binutils-2.24.orig/ld/ldscripts and ld/ldscripts
Common subdirectories: ../binutils-2.24.orig/ld/.libs and ld/.libs

View File

@ -1,19 +0,0 @@
*** ../binutils-2.24.orig/opcodes/s390-mkopc.c 2013-12-05 13:06:00.082812690 +0000
--- opcodes/s390-mkopc.c 2013-12-05 13:13:40.206798138 +0000
*************** dumpTable (void)
*** 298,304 ****
int ix;
/* Write hash table entries (slots). */
! printf (file_header);
for (ix = 0; ix < no_ops; ix++)
{
--- 298,304 ----
int ix;
/* Write hash table entries (slots). */
! printf ("%s", file_header);
for (ix = 0; ix < no_ops; ix++)
{

View File

@ -1,103 +0,0 @@
diff -rcp ../binutils-2.24.orig/bfd/bfd-in2.h bfd/bfd-in2.h
*** ../binutils-2.24.orig/bfd/bfd-in2.h 2014-04-22 12:03:35.226872578 +0100
--- bfd/bfd-in2.h 2014-04-22 12:07:51.556393678 +0100
*************** typedef struct bfd_section *sec_ptr;
*** 294,302 ****
#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0)
- #define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE)
- #define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE)
- #define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE)
/* Find the address one past the end of SEC. */
#define bfd_get_section_limit(bfd, sec) \
(((bfd)->direction != write_direction && (sec)->rawsize != 0 \
--- 294,299 ----
*************** struct relax_table {
*** 1592,1597 ****
--- 1589,1620 ----
int size;
};
+ /* Note: the following are provided as inline functions rather than macros
+ because not all callers use the return value. A macro implementation
+ would use a comma expression, eg: "((ptr)->foo = val, TRUE)" and some
+ compilers will complain about comma expressions that have no effect. */
+ static inline bfd_boolean
+ bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, void * val)
+ {
+ ptr->userdata = val;
+ return TRUE;
+ }
+
+ static inline bfd_boolean
+ bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, bfd_vma val)
+ {
+ ptr->vma = ptr->lma = val;
+ ptr->user_set_vma = TRUE;
+ return TRUE;
+ }
+
+ static inline bfd_boolean
+ bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, unsigned int val)
+ {
+ ptr->alignment_power = val;
+ return TRUE;
+ }
+
/* These sections are global, and are managed by BFD. The application
and target back end are not permitted to change the values in
these sections. */
diff -rcp ../binutils-2.24.orig/bfd/bfd-in.h bfd/bfd-in.h
*** ../binutils-2.24.orig/bfd/bfd-in.h 2014-04-22 12:03:35.272868967 +0100
--- bfd/bfd-in.h 2014-04-22 12:06:12.850914084 +0100
*************** typedef struct bfd_section *sec_ptr;
*** 287,295 ****
#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0)
- #define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE)
- #define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE)
- #define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE)
/* Find the address one past the end of SEC. */
#define bfd_get_section_limit(bfd, sec) \
(((bfd)->direction != write_direction && (sec)->rawsize != 0 \
--- 287,292 ----
diff -rcp ../binutils-2.24.orig/bfd/section.c bfd/section.c
*** ../binutils-2.24.orig/bfd/section.c 2014-04-22 12:03:35.215873442 +0100
--- bfd/section.c 2014-04-22 12:06:55.795118059 +0100
*************** CODE_FRAGMENT
*** 542,547 ****
--- 542,573 ----
. int size;
.};
.
+ .{* Note: the following are provided as inline functions rather than macros
+ . because not all callers use the return value. A macro implementation
+ . would use a comma expression, eg: "((ptr)->foo = val, TRUE)" and some
+ . compilers will complain about comma expressions that have no effect. *}
+ .static inline bfd_boolean
+ .bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, void * val)
+ .{
+ . ptr->userdata = val;
+ . return TRUE;
+ .}
+ .
+ .static inline bfd_boolean
+ .bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, bfd_vma val)
+ .{
+ . ptr->vma = ptr->lma = val;
+ . ptr->user_set_vma = TRUE;
+ . return TRUE;
+ .}
+ .
+ .static inline bfd_boolean
+ .bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, unsigned int val)
+ .{
+ . ptr->alignment_power = val;
+ . return TRUE;
+ .}
+ .
.{* These sections are global, and are managed by BFD. The application
. and target back end are not permitted to change the values in
. these sections. *}

View File

@ -1,310 +0,0 @@
diff -cpr ../binutils-2.24.orig/binutils/config.in binutils/config.in
*** ../binutils-2.24.orig/binutils/config.in 2014-10-31 11:50:20.455222877 +0000
--- binutils/config.in 2014-10-31 11:59:05.021241036 +0000
***************
*** 18,23 ****
--- 18,26 ----
/* Should ar and ranlib use -D behavior by default? */
#undef DEFAULT_AR_DETERMINISTIC
+ /* Should strings use -a behavior by default? */
+ #undef DEFAULT_STRINGS_ALL
+
/* Define to 1 if translation of program messages to the user's native
language is requested. */
#undef ENABLE_NLS
diff -cpr ../binutils-2.24.orig/binutils/configure binutils/configure
*** ../binutils-2.24.orig/binutils/configure 2014-10-31 11:50:20.590223736 +0000
--- binutils/configure 2014-10-31 12:01:46.570102643 +0000
*************** with_gnu_ld
*** 772,777 ****
--- 772,778 ----
enable_libtool_lock
enable_targets
enable_deterministic_archives
+ enable_default_strings_all
enable_werror
enable_build_warnings
enable_nls
*************** Optional Features:
*** 1421,1426 ****
--- 1422,1429 ----
--enable-targets alternative target configurations
--enable-deterministic-archives
ar and ranlib default to -D behavior
+ --disable-default-strings-all
+ strings defaults to --data behavior
--enable-werror treat compile warnings as errors
--enable-build-warnings enable build-time compiler warnings
--disable-nls do not use Native Language Support
*************** cat >>confdefs.h <<_ACEOF
*** 11615,11620 ****
--- 11594,11618 ----
_ACEOF
+ # Check whether --enable-default-strings-all was given.
+ if test "${enable_default_strings_all+set}" = set; then :
+ enableval=$enable_default_strings_all;
+ if test "${enableval}" = no; then
+ default_strings_all=0
+ else
+ default_strings_all=1
+ fi
+ else
+ default_strings_all=1
+ fi
+
+
+
+ cat >>confdefs.h <<_ACEOF
+ #define DEFAULT_STRINGS_ALL $default_strings_all
+ _ACEOF
+
+
GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
diff -cpr ../binutils-2.24.orig/binutils/configure.in binutils/configure.in
*** ../binutils-2.24.orig/binutils/configure.in 2014-10-31 11:50:20.430222717 +0000
--- binutils/configure.in 2014-10-31 12:00:48.092790946 +0000
*************** fi], [default_ar_deterministic=0])
*** 57,62 ****
--- 57,74 ----
AC_DEFINE_UNQUOTED(DEFAULT_AR_DETERMINISTIC, $default_ar_deterministic,
[Should ar and ranlib use -D behavior by default?])
+ AC_ARG_ENABLE(default-strings-all,
+ [AS_HELP_STRING([--disable-default-strings-all],
+ [strings defaults to --data behavior])], [
+ if test "${enableval}" = no; then
+ default_strings_all=0
+ else
+ default_strings_all=1
+ fi], [default_strings_all=1])
+
+ AC_DEFINE_UNQUOTED(DEFAULT_STRINGS_ALL, $default_strings_all,
+ [Should strings use -a behavior by default?])
+
AM_BINUTILS_WARNINGS
AC_CONFIG_HEADERS(config.h:config.in)
diff -cpr ../binutils-2.24.orig/binutils/doc/binutils.texi binutils/doc/binutils.texi
*** ../binutils-2.24.orig/binutils/doc/binutils.texi 2014-10-31 11:50:20.579223666 +0000
--- binutils/doc/binutils.texi 2014-10-31 11:59:23.052339164 +0000
*************** strings [@option{-afovV}] [@option{-}@va
*** 2653,2667 ****
@c man begin DESCRIPTION strings
! For each @var{file} given, @sc{gnu} @command{strings} prints the printable
! character sequences that are at least 4 characters long (or the number
! given with the options below) and are followed by an unprintable
! character. By default, it only prints the strings from the initialized
! and loaded sections of object files; for other types of files, it prints
! the strings from the whole file.
! @command{strings} is mainly useful for determining the contents of non-text
! files.
@c man end
--- 2653,2676 ----
@c man begin DESCRIPTION strings
! For each @var{file} given, @sc{gnu} @command{strings} prints the
! printable character sequences that are at least 4 characters long (or
! the number given with the options below) and are followed by an
! unprintable character.
!
! Depending upon how the strings program was configured it will default
! to either displaying all the printable sequences that it can find in
! each file, or only those sequences that are in loadable, initialized
! data sections. If the file type in unrecognizable, or if strings is
! reading from stdin then it will always display all of the printable
! sequences that it can find.
!
! For backwards compatibility any file that occurs after a command line
! option of just @option{-} will also be scanned in full, regardless of
! the presence of any @option{-d} option.
! @command{strings} is mainly useful for determining the contents of
! non-text files.
@c man end
*************** files.
*** 2671,2678 ****
@item -a
@itemx --all
@itemx -
! Do not scan only the initialized and loaded sections of object files;
! scan the whole files.
@item -f
@itemx --print-file-name
--- 2680,2704 ----
@item -a
@itemx --all
@itemx -
! Scan the whole file, regardless of what sections it contains or
! whether those sections are loaded or initialized. Normally this is
! the default behaviour, but strings can be configured so that the
! @option{-d} is the default instead.
!
! The @option{-} option is position dependent and forces strings to
! perform full scans of any file that is mentioned after the @option{-}
! on the command line, even if the @option{-d} option has been
! specified.
!
! @item -d
! @itemx --data
! Only print strings from initialized, loaded data sections in the
! file. This may reduce the amount of garbage in the output, but it
! also exposes the strings program to any security flaws that may be
! present in the BFD library used to scan and load sections. Strings
! can be configured so that this option is the default behaviour. In
! such cases the @option{-a} option can be used to avoid using the BFD
! library and instead just print all of the strings found in the file.
@item -f
@itemx --print-file-name
diff -cpr ../binutils-2.24.orig/binutils/NEWS binutils/NEWS
*** ../binutils-2.24.orig/binutils/NEWS 2014-10-31 11:50:20.338222131 +0000
--- binutils/NEWS 2014-10-31 11:59:52.315493579 +0000
***************
*** 1,5 ****
--- 1,10 ----
-*- text -*-
+ * Add --data option to strings to only print strings in loadable, initialized
+ data sections. Change the default behaviour to be --all, but add a new
+ configure time option of --disable-default-strings-all to restore the old
+ default behaviour.
+
Changes in 2.24:
* Objcopy now supports wildcard characters in command line options that take
diff -cpr ../binutils-2.24.orig/binutils/strings.c binutils/strings.c
*** ../binutils-2.24.orig/binutils/strings.c 2014-10-31 11:50:20.464222934 +0000
--- binutils/strings.c 2014-10-31 12:01:33.901035485 +0000
***************
*** 23,29 ****
Options:
--all
-a
! - Do not scan only the initialized data section of object files.
--print-file-name
-f Print the name of the file before each string.
--- 23,32 ----
Options:
--all
-a
! - Scan each file in its entirety.
!
! --data
! -d Scan only the initialized data section(s) of object files.
--print-file-name
-f Print the name of the file before each string.
*************** static int encoding_bytes;
*** 107,112 ****
--- 110,116 ----
static struct option long_options[] =
{
{"all", no_argument, NULL, 'a'},
+ {"data", no_argument, NULL, 'd'},
{"print-file-name", no_argument, NULL, 'f'},
{"bytes", required_argument, NULL, 'n'},
{"radix", required_argument, NULL, 't'},
*************** typedef struct
*** 128,134 ****
static void strings_a_section (bfd *, asection *, void *);
static bfd_boolean strings_object_file (const char *);
! static bfd_boolean strings_file (char *file);
static void print_strings (const char *, FILE *, file_ptr, int, int, char *);
static void usage (FILE *, int);
static long get_char (FILE *, file_ptr *, int *, char **);
--- 132,138 ----
static void strings_a_section (bfd *, asection *, void *);
static bfd_boolean strings_object_file (const char *);
! static bfd_boolean strings_file (char *);
static void print_strings (const char *, FILE *, file_ptr, int, int, char *);
static void usage (FILE *, int);
static long get_char (FILE *, file_ptr *, int *, char **);
*************** main (int argc, char **argv)
*** 158,168 ****
string_min = 4;
print_addresses = FALSE;
print_filenames = FALSE;
! datasection_only = TRUE;
target = NULL;
encoding = 's';
! while ((optc = getopt_long (argc, argv, "afhHn:ot:e:T:Vv0123456789",
long_options, (int *) 0)) != EOF)
{
switch (optc)
--- 162,175 ----
string_min = 4;
print_addresses = FALSE;
print_filenames = FALSE;
! if (DEFAULT_STRINGS_ALL)
! datasection_only = FALSE;
! else
! datasection_only = TRUE;
target = NULL;
encoding = 's';
! while ((optc = getopt_long (argc, argv, "adfhHn:ot:e:T:Vv0123456789",
long_options, (int *) 0)) != EOF)
{
switch (optc)
*************** main (int argc, char **argv)
*** 171,176 ****
--- 178,187 ----
datasection_only = FALSE;
break;
+ case 'd':
+ datasection_only = TRUE;
+ break;
+
case 'f':
print_filenames = TRUE;
break;
*************** usage (FILE *stream, int status)
*** 635,642 ****
{
fprintf (stream, _("Usage: %s [option(s)] [file(s)]\n"), program_name);
fprintf (stream, _(" Display printable strings in [file(s)] (stdin by default)\n"));
! fprintf (stream, _(" The options are:\n\
-a - --all Scan the entire file, not just the data section\n\
-f --print-file-name Print the name of the file before each string\n\
-n --bytes=[number] Locate & print any NUL-terminated sequence of at\n\
-<number> least [number] characters (default 4).\n\
--- 646,663 ----
{
fprintf (stream, _("Usage: %s [option(s)] [file(s)]\n"), program_name);
fprintf (stream, _(" Display printable strings in [file(s)] (stdin by default)\n"));
! fprintf (stream, _(" The options are:\n"));
!
! if (DEFAULT_STRINGS_ALL)
! fprintf (stream, _("\
! -a - --all Scan the entire file, not just the data section [default]\n\
! -d --data Only scan the data sections in the file\n"));
! else
! fprintf (stream, _("\
-a - --all Scan the entire file, not just the data section\n\
+ -d --data Only scan the data sections in the file [default]\n"));
+
+ fprintf (stream, _("\
-f --print-file-name Print the name of the file before each string\n\
-n --bytes=[number] Locate & print any NUL-terminated sequence of at\n\
-<number> least [number] characters (default 4).\n\
Only in binutils: strings.c.rej

View File

@ -1,114 +0,0 @@
From 4c6d802e592b3762a149c343bc5722e065e57841 Mon Sep 17 00:00:00 2001
From: H.J. Lu <hjl.tools@gmail.com>
Date: Wed, 26 Mar 2014 12:18:59 -0700
Subject: [PATCH] Scan all input files for symbol reference warning
This patch scans all input files for symbol reference warning if the
symbol reference doesn't exist in the current input file.
ld/
PR ld/16756
* ldmain.c (symbol_warning): New function.
(warning_callback): Use it. Scan all input files for a reference
to SYMBOL.
ld/testsuite/
PR ld/16756
* ld-plugin/lto.exp: Expect filename and line number for PR
ld/12760 test.
---
ld/ChangeLog | 7 ++++
ld/ldmain.c | 43 ++++++++++++++++----------
ld/testsuite/ChangeLog | 64 ++++++++++++++++++++++------------------
ld/testsuite/ld-plugin/lto.exp | 4 +-
4 files changed, 70 insertions(+), 48 deletions(-)
diff --git a/ld/ldmain.c b/ld/ldmain.c
index ffc9f84..14253a6 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -1150,6 +1150,25 @@ struct warning_callback_info
asymbol **asymbols;
};
+/* Look through the relocs to see if we can find a plausible address
+ for SYMBOL in ABFD. Return TRUE if found. Otherwise return FALSE. */
+
+static bfd_boolean
+symbol_warning (const char *warning, const char *symbol, bfd *abfd)
+{
+ struct warning_callback_info cinfo;
+
+ if (!bfd_generic_link_read_symbols (abfd))
+ einfo (_("%B%F: could not read symbols: %E\n"), abfd);
+
+ cinfo.found = FALSE;
+ cinfo.warning = warning;
+ cinfo.symbol = symbol;
+ cinfo.asymbols = bfd_get_outsymbols (abfd);
+ bfd_map_over_sections (abfd, warning_find_reloc, &cinfo);
+ return cinfo.found;
+}
+
/* This is called when there is a reference to a warning symbol. */
static bfd_boolean
--- a/ld/ldmain.c 2014-06-24 14:04:00.700594584 -0400
+++ b/ld/ldmain.c 2014-06-24 14:07:19.452270808 -0400
@@ -1172,24 +1172,14 @@
einfo ("%P: %s%s\n", _("warning: "), warning);
else if (symbol == NULL)
einfo ("%B: %s%s\n", abfd, _("warning: "), warning);
- else if ((abfd->flags & BFD_PLUGIN) == 0)
+ else if (! symbol_warning (warning, symbol, abfd))
{
- struct warning_callback_info cinfo;
-
- /* Look through the relocs to see if we can find a plausible
- address. */
-
- if (!bfd_generic_link_read_symbols (abfd))
- einfo (_("%B%F: could not read symbols: %E\n"), abfd);
-
- cinfo.found = FALSE;
- cinfo.warning = warning;
- cinfo.symbol = symbol;
- cinfo.asymbols = bfd_get_outsymbols (abfd);
- bfd_map_over_sections (abfd, warning_find_reloc, &cinfo);
-
- if (! cinfo.found)
- einfo ("%B: %s%s\n", abfd, _("warning: "), warning);
+ bfd *b;
+ /* Search all input files for a reference to SYMBOL. */
+ for (b = info->input_bfds; b; b = b->link_next)
+ if (b != abfd && symbol_warning (warning, symbol, b))
+ return TRUE;
+ einfo ("%B: %s%s\n", abfd, _("warning: "), warning);
}
return TRUE;
diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp
index af7307f..53543a6 100644
--- a/ld/testsuite/ld-plugin/lto.exp
+++ b/ld/testsuite/ld-plugin/lto.exp
@@ -116,14 +116,14 @@ set lto_link_tests {
"-O2 -Wl,-e,foo -nostdlib -flto -fuse-linker-plugin tmpdir/pr12758a.o -Wl,--start-group tmpdir/libpr12758.a -Wl,--end-group" ""
{dummy.c} {} "pr12758.exe"}
{"Build libdummy.a PR ld/12760"
- "" ""
+ "" "-g -O0"
{pr12760a.c} {} "libdummy.a"}
{"Build libpr12760.a"
"" "-flto -O2 -ffat-lto-objects"
{pr12760b.c} {} "libpr12760.a"}
{"PR ld/12760"
"-O2 -Wl,-e,foo -nostdlib -flto -fuse-linker-plugin tmpdir/pr12760a.o -Wl,--start-group tmpdir/libpr12760.a -Wl,--end-group" ""
- {dummy.c} {} "pr12760.exe" "c" "warning: Bad bar"}
+ {dummy.c} {} "pr12760.exe" "c" "pr12760a.c:6: warning: Bad bar"}
{"Build libpr13183.a"
"-T" "-flto -O2 -ffat-lto-objects"
{pr13183a.c} {} "libpr13183.a"}
--
1.7.1

View File

@ -1,22 +0,0 @@
*** ../binutils-2.24.orig/bfd/elflink.c 2014-08-15 14:12:59.933394436 +0100
--- bfd/elflink.c 2014-08-15 14:40:54.787075416 +0100
*************** _bfd_elf_merge_symbol (bfd *abfd,
*** 1437,1443 ****
if (!(oldbfd != NULL
&& (oldbfd->flags & BFD_PLUGIN) != 0
&& (abfd->flags & BFD_PLUGIN) == 0))
! *skip = TRUE;
/* Merge st_other. If the symbol already has a dynamic index,
but visibility says it should not be visible, turn it into a
--- 1437,1446 ----
if (!(oldbfd != NULL
&& (oldbfd->flags & BFD_PLUGIN) != 0
&& (abfd->flags & BFD_PLUGIN) == 0))
! {
! newdef = FALSE;
! *skip = TRUE;
! }
/* Merge st_other. If the symbol already has a dynamic index,
but visibility says it should not be visible, turn it into a

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,38 @@
diff -up binutils-2.25.orig/bfd/configure.ac binutils-2.25/bfd/configure.ac
--- binutils-2.25.orig/bfd/configure.ac 2014-12-24 10:34:45.590491143 +0000
+++ binutils-2.25/bfd/configure.ac 2014-12-24 10:36:12.997981992 +0000
@@ -183,11 +183,13 @@ if test "x${ac_cv_sizeof_long}" = "x8";
BFD_HOST_64BIT_LONG=1
test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long"
test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long"
-elif test "x${ac_cv_sizeof_long_long}" = "x8"; then
+fi
+if test "x${ac_cv_sizeof_long_long}" = "x8"; then
BFD_HOST_64BIT_LONG_LONG=1
test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long"
test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long long"
- if test "x${ac_cv_sizeof_void_p}" = "x8"; then
+ if test "x${ac_cv_sizeof_void_p}" = "x8" \
+ -a "x${ac_cv_sizeof_long}" != "x8"; then
BFD_HOSTPTR_T="unsigned long long"
fi
fi
diff -up ../binutils-2.20.51.0.7.original/bfd/configure ./bfd/configure
--- a/bfd/configure 2010-04-08 15:23:58.000000000 +0100
+++ b/bfd/configure 2010-04-08 15:24:06.000000000 +0100
@@ -12819,11 +12819,13 @@
BFD_HOST_64BIT_LONG=1
test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long"
test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long"
-elif test "x${ac_cv_sizeof_long_long}" = "x8"; then
+fi
+if test "x${ac_cv_sizeof_long_long}" = "x8"; then
BFD_HOST_64BIT_LONG_LONG=1
test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long"
test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long long"
- if test "x${ac_cv_sizeof_void_p}" = "x8"; then
+ if test "x${ac_cv_sizeof_void_p}" = "x8" \
+ -a "x${ac_cv_sizeof_long}" != "x8"; then
BFD_HOSTPTR_T="unsigned long long"
fi
fi

View File

@ -0,0 +1,47 @@
diff -up binutils-2.25.orig/bfd/Makefile.am binutils-2.25/bfd/Makefile.am
--- binutils-2.25.orig/bfd/Makefile.am 2014-12-24 10:28:10.546273213 +0000
+++ binutils-2.25/bfd/Makefile.am 2014-12-24 10:30:27.569042391 +0000
@@ -1025,8 +1025,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 ;\
@@ -1037,7 +1037,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
diff -up binutils-2.25.orig/bfd/Makefile.in binutils-2.25/bfd/Makefile.in
--- binutils-2.25.orig/bfd/Makefile.in 2014-12-24 10:28:10.558273280 +0000
+++ binutils-2.25/bfd/Makefile.in 2014-12-24 10:31:37.444434637 +0000
@@ -2085,8 +2085,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 ;\
@@ -2097,7 +2097,7 @@ bfdver.h: $(srcdir)/version.h $(srcdir)/
fi ;\
sed -e "s,@bfd_version@,$$bfd_version," \
-e "s,@bfd_version_string@,$$bfd_version_string," \
- -e "s,@bfd_version_package@,$$bfd_version_package," \
+ -e "s,@bfd_version_package@,\"version \"," \
-e "s,@report_bugs_to@,$$report_bugs_to," \
< $(srcdir)/version.h > $@; \
echo "$${bfd_soversion}" > libtool-soversion

View File

@ -1,398 +0,0 @@
From 4613510308cea27713e8c7424b2afee9b99f6226 Mon Sep 17 00:00:00 2001
From: Alan Modra <amodra@gmail.com>
Date: Tue, 12 Aug 2014 10:43:33 +0930
Subject: [PATCH] Change ld "notice" interface for better handling of
indirect symbols
The main aim of this change was to have non_ir_ref set correctly on
new indirect symbols. I could have added a "copy" param to the "notice"
function, so that indirect symbols could be created in plugin_notice,
but it seemed cleaner to create indirect syms earlier and pass them
rather than "string" to "notice".
include/
* bfdlink.h (struct bfd_link_callbacks <notice>): Remove "string"
param, add "inh".
bfd/
* coff-aux.c (coff_m68k_aux_link_add_one_symbol): Only call "notice"
here when not calling the generic add_symbol function. Formatting.
Correct handling of indirect symbols. Update notice call.
* elflink.c (_bfd_elf_notice_as_needed): Update notice call.
* linker.c (_bfd_generic_link_add_one_symbol): Create indirect
symbols early. Update notice call. Add comments regarding weak
symbols vs. indirect.
ld/
* ldmain.c (notice): Update args.
* plugin.c (plugin_notice): Likewise. Follow warning sym link.
Handle new indirect symbol.
---
bfd/coff-aux.c | 62 ++++++++++++++++++++++-------------------
bfd/elflink.c | 2 +-
bfd/linker.c | 82 +++++++++++++++++++++++++++++--------------------------
include/bfdlink.h | 13 ++++-----
ld/ldmain.c | 6 ++--
ld/plugin.c | 33 ++++++++++++----------
9 files changed, 128 insertions(+), 91 deletions(-)
diff --git a/bfd/coff-aux.c b/bfd/coff-aux.c
index e79c77a..d95b98b 100644
--- a/bfd/coff-aux.c
+++ b/bfd/coff-aux.c
@@ -73,20 +73,17 @@ coff_m68k_aux_link_add_one_symbol (struct bfd_link_info *info,
bfd_boolean collect,
struct bfd_link_hash_entry **hashp)
{
- struct bfd_link_hash_entry *h;
+ struct bfd_link_hash_entry *h, *inh, *t;
- if ((flags & (BSF_WARNING | BSF_CONSTRUCTOR | BSF_WEAK)) == 0 &&
- !bfd_is_und_section (section) &&
- !bfd_is_com_section (section))
+ if ((flags & (BSF_WARNING | BSF_CONSTRUCTOR | BSF_WEAK)) == 0
+ && !bfd_is_und_section (section)
+ && !bfd_is_com_section (section))
{
/* The new symbol is a definition or an indirect definition */
/* This bit copied from linker.c */
if (hashp != NULL && *hashp != NULL)
- {
- h = *hashp;
- BFD_ASSERT (strcmp (h->root.string, name) == 0);
- }
+ h = *hashp;
else
{
h = bfd_link_hash_lookup (info->hash, name, TRUE, copy, FALSE);
@@ -98,37 +95,46 @@ coff_m68k_aux_link_add_one_symbol (struct bfd_link_info *info,
}
}
- if (info->notice_hash != (struct bfd_hash_table *) NULL
- && (bfd_hash_lookup (info->notice_hash, name, FALSE, FALSE)
- != (struct bfd_hash_entry *) NULL))
- {
- if (! (*info->callbacks->notice) (info, h, abfd, section, value,
- flags, string))
- return FALSE;
- }
-
if (hashp != (struct bfd_link_hash_entry **) NULL)
*hashp = h;
/* end duplication from linker.c */
- if (h->type == bfd_link_hash_defined
- || h->type == bfd_link_hash_indirect)
+ t = h;
+ inh = NULL;
+ if (h->type == bfd_link_hash_indirect)
{
- asection *msec;
+ inh = h->u.i.link;
+ t = inh;
+ }
- if (h->type == bfd_link_hash_defined)
- msec = h->u.def.section;
- else
- msec = bfd_ind_section_ptr;
+ if (t->type == bfd_link_hash_defined)
+ {
+ asection *msec = t->u.def.section;
+ bfd_boolean special = FALSE;
if (bfd_is_abs_section (msec) && !bfd_is_abs_section (section))
{
- h->u.def.section = section;
- h->u.def.value = value;
- return TRUE;
+ t->u.def.section = section;
+ t->u.def.value = value;
+ special = TRUE;
}
else if (bfd_is_abs_section (section) && !bfd_is_abs_section (msec))
- return TRUE;
+ special = TRUE;
+
+ if (special)
+ {
+ if (info->notice_all
+ || (info->notice_hash != NULL
+ && bfd_hash_lookup (info->notice_hash, name,
+ FALSE, FALSE) != NULL))
+ {
+ if (!(*info->callbacks->notice) (info, h, inh,
+ abfd, section, value, flags))
+ return FALSE;
+ }
+
+ return TRUE;
+ }
}
}
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 69a87a6..de0a734 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -3299,7 +3299,7 @@ _bfd_elf_notice_as_needed (bfd *ibfd,
struct bfd_link_info *info,
enum notice_asneeded_action act)
{
- return (*info->callbacks->notice) (info, NULL, ibfd, NULL, act, 0, NULL);
+ return (*info->callbacks->notice) (info, NULL, NULL, ibfd, NULL, act, 0);
}
/* Add symbols from an ELF object file to the linker hash table. */
diff --git a/bfd/linker.c b/bfd/linker.c
index 1a5ecef..abdf5b0 100644
--- a/bfd/linker.c
+++ b/bfd/linker.c
@@ -1442,13 +1442,23 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info,
{
enum link_row row;
struct bfd_link_hash_entry *h;
+ struct bfd_link_hash_entry *inh = NULL;
bfd_boolean cycle;
BFD_ASSERT (section != NULL);
if (bfd_is_ind_section (section)
|| (flags & BSF_INDIRECT) != 0)
- row = INDR_ROW;
+ {
+ row = INDR_ROW;
+ /* Create the indirect symbol here. This is for the benefit of
+ the plugin "notice" function.
+ STRING is the name of the symbol we want to indirect to. */
+ inh = bfd_wrapped_link_hash_lookup (abfd, info, string, TRUE,
+ copy, FALSE);
+ if (inh == NULL)
+ return FALSE;
+ }
else if ((flags & BSF_WARNING) != 0)
row = WARN_ROW;
else if ((flags & BSF_CONSTRUCTOR) != 0)
@@ -1493,8 +1503,8 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info,
|| (info->notice_hash != NULL
&& bfd_hash_lookup (info->notice_hash, name, FALSE, FALSE) != NULL))
{
- if (! (*info->callbacks->notice) (info, h,
- abfd, section, value, flags, string))
+ if (! (*info->callbacks->notice) (info, h, inh,
+ abfd, section, value, flags))
return FALSE;
}
@@ -1728,44 +1738,40 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info,
return FALSE;
/* Fall through. */
case IND:
- /* Create an indirect symbol. */
- {
- struct bfd_link_hash_entry *inh;
-
- /* STRING is the name of the symbol we want to indirect
- to. */
- inh = bfd_wrapped_link_hash_lookup (abfd, info, string, TRUE,
- copy, FALSE);
- if (inh == NULL)
+ if (inh->type == bfd_link_hash_indirect
+ && inh->u.i.link == h)
+ {
+ (*_bfd_error_handler)
+ (_("%B: indirect symbol `%s' to `%s' is a loop"),
+ abfd, name, string);
+ bfd_set_error (bfd_error_invalid_operation);
return FALSE;
- if (inh->type == bfd_link_hash_indirect
- && inh->u.i.link == h)
- {
- (*_bfd_error_handler)
- (_("%B: indirect symbol `%s' to `%s' is a loop"),
- abfd, name, string);
- bfd_set_error (bfd_error_invalid_operation);
- return FALSE;
- }
- if (inh->type == bfd_link_hash_new)
- {
- inh->type = bfd_link_hash_undefined;
- inh->u.undef.abfd = abfd;
- bfd_link_add_undef (info->hash, inh);
- }
+ }
+ if (inh->type == bfd_link_hash_new)
+ {
+ inh->type = bfd_link_hash_undefined;
+ inh->u.undef.abfd = abfd;
+ bfd_link_add_undef (info->hash, inh);
+ }
- /* If the indirect symbol has been referenced, we need to
- push the reference down to the symbol we are
- referencing. */
- if (h->type != bfd_link_hash_new)
- {
- row = UNDEF_ROW;
- cycle = TRUE;
- }
+ /* If the indirect symbol has been referenced, we need to
+ push the reference down to the symbol we are referencing. */
+ if (h->type != bfd_link_hash_new)
+ {
+ /* ??? If inh->type == bfd_link_hash_undefweak this
+ converts inh to bfd_link_hash_undefined. */
+ row = UNDEF_ROW;
+ cycle = TRUE;
+ }
- h->type = bfd_link_hash_indirect;
- h->u.i.link = inh;
- }
+ h->type = bfd_link_hash_indirect;
+ h->u.i.link = inh;
+ /* Not setting h = h->u.i.link here means that when cycle is
+ set above we'll always go to REFC, and then cycle again
+ to the indirected symbol. This means that any successful
+ change of an existing symbol to indirect counts as a
+ reference. ??? That may not be correct when the existing
+ symbol was defweak. */
break;
case SET:
diff --git a/include/bfdlink.h b/include/bfdlink.h
index 58dba2a..125683d 100644
--- a/include/bfdlink.h
+++ b/include/bfdlink.h
@@ -640,15 +640,14 @@ struct bfd_link_callbacks
(struct bfd_link_info *, const char *name,
bfd *abfd, asection *section, bfd_vma address);
/* A function which is called when a symbol in notice_hash is
- defined or referenced. H is the symbol. ABFD, SECTION and
- ADDRESS are the (new) value of the symbol. If SECTION is
- bfd_und_section, this is a reference. FLAGS are the symbol
- BSF_* flags. STRING is the name of the symbol to indirect to if
- the sym is indirect, or the warning string if a warning sym. */
+ defined or referenced. H is the symbol, INH the indirect symbol
+ if applicable. ABFD, SECTION and ADDRESS are the (new) value of
+ the symbol. If SECTION is bfd_und_section, this is a reference.
+ FLAGS are the symbol BSF_* flags. */
bfd_boolean (*notice)
(struct bfd_link_info *, struct bfd_link_hash_entry *h,
- bfd *abfd, asection *section, bfd_vma address, flagword flags,
- const char *string);
+ struct bfd_link_hash_entry *inh,
+ bfd *abfd, asection *section, bfd_vma address, flagword flags);
/* Error or warning link info message. */
void (*einfo)
(const char *fmt, ...);
diff --git a/ld/ldmain.c b/ld/ldmain.c
index ea25afe..77235d5 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -137,7 +137,7 @@ static bfd_boolean unattached_reloc
(struct bfd_link_info *, const char *, bfd *, asection *, bfd_vma);
static bfd_boolean notice
(struct bfd_link_info *, struct bfd_link_hash_entry *,
- bfd *, asection *, bfd_vma, flagword, const char *);
+ struct bfd_link_hash_entry *, bfd *, asection *, bfd_vma, flagword);
static struct bfd_link_callbacks link_callbacks =
{
@@ -1461,11 +1461,11 @@ unattached_reloc (struct bfd_link_info *info ATTRIBUTE_UNUSED,
static bfd_boolean
notice (struct bfd_link_info *info,
struct bfd_link_hash_entry *h,
+ struct bfd_link_hash_entry *inh ATTRIBUTE_UNUSED,
bfd *abfd,
asection *section,
bfd_vma value,
- flagword flags ATTRIBUTE_UNUSED,
- const char *string ATTRIBUTE_UNUSED)
+ flagword flags ATTRIBUTE_UNUSED)
{
const char *name;
diff --git a/ld/plugin.c b/ld/plugin.c
index 8d6ae05..8cca7d0 100644
--- a/ld/plugin.c
+++ b/ld/plugin.c
@@ -127,8 +127,9 @@ static const size_t tv_header_size = ARRAY_SIZE (tv_header_tags);
/* Forward references. */
static bfd_boolean plugin_notice (struct bfd_link_info *,
- struct bfd_link_hash_entry *, bfd *,
- asection *, bfd_vma, flagword, const char *);
+ struct bfd_link_hash_entry *,
+ struct bfd_link_hash_entry *,
+ bfd *, asection *, bfd_vma, flagword);
#if !defined (HAVE_DLFCN_H) && defined (HAVE_WINDOWS_H)
@@ -962,16 +963,21 @@ plugin_call_cleanup (void)
static bfd_boolean
plugin_notice (struct bfd_link_info *info,
struct bfd_link_hash_entry *h,
+ struct bfd_link_hash_entry *inh,
bfd *abfd,
asection *section,
bfd_vma value,
- flagword flags,
- const char *string)
+ flagword flags)
{
+ struct bfd_link_hash_entry *orig_h = h;
+
if (h != NULL)
{
bfd *sym_bfd;
+ if (h->type == bfd_link_hash_warning)
+ h = h->u.i.link;
+
/* Nothing to do here if this def/ref is from an IR dummy BFD. */
if (is_ir_dummy_bfd (abfd))
;
@@ -981,16 +987,15 @@ plugin_notice (struct bfd_link_info *info,
else if (bfd_is_ind_section (section)
|| (flags & BSF_INDIRECT) != 0)
{
+ /* ??? Some of this is questionable. See comments in
+ _bfd_generic_link_add_one_symbol for case IND. */
if (h->type != bfd_link_hash_new)
{
- struct bfd_link_hash_entry *inh;
-
h->non_ir_ref = TRUE;
- inh = bfd_wrapped_link_hash_lookup (abfd, info, string, FALSE,
- FALSE, FALSE);
- if (inh != NULL)
- inh->non_ir_ref = TRUE;
+ inh->non_ir_ref = TRUE;
}
+ else if (inh->type == bfd_link_hash_new)
+ inh->non_ir_ref = TRUE;
}
/* Nothing to do here for warning symbols. */
@@ -1031,13 +1036,13 @@ plugin_notice (struct bfd_link_info *info,
}
/* Continue with cref/nocrossref/trace-sym processing. */
- if (h == NULL
+ if (orig_h == NULL
|| orig_notice_all
|| (info->notice_hash != NULL
- && bfd_hash_lookup (info->notice_hash, h->root.string,
+ && bfd_hash_lookup (info->notice_hash, orig_h->root.string,
FALSE, FALSE) != NULL))
- return (*orig_callbacks->notice) (info, h,
- abfd, section, value, flags, string);
+ return (*orig_callbacks->notice) (info, orig_h, inh,
+ abfd, section, value, flags);
return TRUE;
}
--
1.9.3

View File

@ -18,8 +18,8 @@
Summary: A GNU collection of binary utilities
Name: %{?cross}binutils%{?_with_debug:-debug}
Version: 2.24
Release: 29%{?dist}
Version: 2.25
Release: 1%{?dist}
License: GPLv3+
Group: Development/Tools
URL: http://sources.redhat.com/binutils
@ -34,8 +34,8 @@ Source2: binutils-2.19.50.0.1-output-format.sed
Patch01: binutils-2.20.51.0.2-libtool-lib64.patch
Patch02: binutils-2.20.51.0.10-ppc64-pie.patch
Patch03: binutils-2.20.51.0.2-ia64-lib64.patch
Patch04: binutils-2.20.51.0.2-version.patch
Patch05: binutils-2.20.51.0.2-set-long-long.patch
Patch04: binutils-2.25-version.patch
Patch05: binutils-2.25-set-long-long.patch
Patch06: binutils-2.20.51.0.10-copy-osabi.patch
Patch07: binutils-2.20.51.0.10-sec-merge-emit.patch
# Enable -zrelro by default: BZ #621983
@ -46,35 +46,12 @@ Patch09: binutils-2.22.52.0.1-export-demangle.h.patch
Patch10: binutils-2.22.52.0.4-no-config-h-check.patch
# Fix addr2line to use the dynamic symbol table if it could not find any ordinary symbols.
Patch11: binutils-2.23.52.0.1-addr2line-dynsymtab.patch
Patch12: binutils-2.23.2-kernel-ld-r.patch
# Patch12: binutils-2.23.2-kernel-ld-r.patch
Patch12: binutils-2.25-kernel-ld-r.patch
# Correct bug introduced by patch 12
Patch13: binutils-2.23.2-aarch64-em.patch
# Fix building opcodes library with -Werror=format-security
Patch14: binutils-2.24-s390-mkopc.patch
# Import fixes for IFUNC and PLT handling for AArch64.
Patch15: binutils-2.24-elfnn-aarch64.patch
# Fix decoding of abstract instance names using DW_FORM_ref_addr.
Patch16: binutils-2.24-DW_FORM_ref_addr.patch
# Fix compiling using gcc 4.9
Patch17: binutils-2.24-set-section-macros.patch
# Fix detections of uncompressed .debug_str sections that look like they have been compressed.
Patch18: binutils-2.24-fake-zlib-sections.patch
# Fix detections little endian PPC shared libraries
Patch19: binutils-2.24-ldforcele.patch
Patch20: binutils-2.24-arm-static-tls.patch
Patch21: binutils-2.24-fat-lto-objects.patch
Patch22: binutils-2.24-symbol-warning.patch
Patch23: binutils-2.24-aarch64-ld-shared-non-PIC-xfail.patch
Patch24: binutils-2.24-weak-sym-merge.patch
Patch25: binutils-2.24-indirect-chain.patch
Patch26: binutils-2.24-aarch64-fix-final_link_relocate.patch
Patch27: binutils-2.24-aarch64-fix-gotplt-offset-ifunc.patch
Patch28: binutils-2.24-aarch64-fix-static-ifunc.patch
Patch29: binutils-2.24-aarch64-fix-ie-relax.patch
Patch30: binutils-HEAD-change-ld-notice-interface.patch
Patch31: binutils-2.24-corrupt-binaries.patch
Patch32: binutils-2.24-strings-default-all.patch
Patch33: binutils-2.24-corrupt-ar.patch
Patch14: binutils-2.24-ldforcele.patch
Provides: bundled(libiberty)
@ -171,47 +148,28 @@ using libelf instead of BFD.
%prep
%setup -q -n binutils-%{version}
%patch01 -p0 -b .libtool-lib64~
%patch02 -p0 -b .ppc64-pie~
%patch01 -p1 -b .libtool-lib64~
%patch02 -p1 -b .ppc64-pie~
%ifarch ia64
%if "%{_lib}" == "lib64"
%patch03 -p0 -b .ia64-lib64~
%patch03 -p1 -b .ia64-lib64~
%endif
%endif
%patch04 -p0 -b .version~
%patch05 -p0 -b .set-long-long~
%patch06 -p0 -b .copy-osabi~
%patch07 -p0 -b .sec-merge-emit~
%patch04 -p1 -b .version~
%patch05 -p1 -b .set-long-long~
%patch06 -p1 -b .copy-osabi~
%patch07 -p1 -b .sec-merge-emit~
%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
%patch08 -p0 -b .relro~
%patch08 -p1 -b .relro~
%endif
%patch09 -p0 -b .export-demangle-h~
%patch10 -p0 -b .no-config-h-check~
%patch11 -p0 -b .addr2line~
%patch12 -p0 -b .kernel-ld-r~
%patch13 -p0 -b .aarch64~
%patch14 -p0 -b .mkopc~
%patch15 -p0 -b .elf-aarch64~
%patch16 -p0 -b .ref-addr~
%patch17 -p0 -b .sec-macros~
%patch18 -p0 -b .fake-zlib~
%patch09 -p1 -b .export-demangle-h~
%patch10 -p1 -b .no-config-h-check~
%patch11 -p1 -b .addr2line~
%patch12 -p1 -b .kernel-ld-r~
%patch13 -p1 -b .aarch64~
%ifarch ppc64le
%patch19 -p0 -b .ldforcele~
%patch14 -p1 -b .ldforcele~
%endif
%patch20 -p1 -b .armstatictls~
%patch21 -p1 -b .fatlto~
%patch22 -p1 -b .symwarn~
%patch23 -p1 -b .ld-aarch64-xfails~
%patch24 -p0 -b .weak-sym-merge~
%patch25 -p0 -b .indirect-chain~
%patch26 -p1 -b .aa64-final-link~
%patch27 -p1 -b .aa64-1~
%patch28 -p1 -b .aa64-2~
%patch29 -p1 -b .aa64-3~
%patch30 -p1 -b .ldplugin~
%patch31 -p0 -b .corrupt-binaries~
%patch32 -p0 -b .strings-all~
%patch33 -p0 -b .corrupt-ar~
# We cannot run autotools as there is an exact requirement of autoconf-2.59.
@ -526,6 +484,28 @@ exit 0
%endif # %{isnative}
%changelog
* Wed Dec 24 2014 Nick Clifton <nickc@redhat.com> - 2.25-1
- Rebase on FSF binutils 2.25 release.
- Retire: binutils-2.24-s390-mkopc.patch
- Retire: binutils-2.24-elfnn-aarch64.patch
- Retire: binutils-2.24-DW_FORM_ref_addr.patch
- Retire: binutils-2.24-set-section-macros.patch
- Retire: binutils-2.24-fake-zlib-sections.patch
- Retire: binutils-2.24-arm-static-tls.patch
- Retire: binutils-2.24-fat-lto-objects.patch
- Retire: binutils-2.24-symbol-warning.patch
- Retire: binutils-2.24-aarch64-ld-shared-non-PIC-xfail.patch
- Retire: binutils-2.24-weak-sym-merge.patch
- Retire: binutils-2.24-indirect-chain.patch
- Retire: binutils-2.24-aarch64-fix-final_link_relocate.patch
- Retire: binutils-2.24-aarch64-fix-gotplt-offset-ifunc.patch
- Retire: binutils-2.24-aarch64-fix-static-ifunc.patch
- Retire: binutils-2.24-aarch64-fix-ie-relax.patch
- Retire: binutils-HEAD-change-ld-notice-interface.patch
- Retire: binutils-2.24-corrupt-binaries.patch
- Retire: binutils-2.24-strings-default-all.patch
- Retire: binutils-2.24-corrupt-ar.patch
* Thu Nov 13 2014 Nick Clifton <nickc@redhat.com> - 2.24-29
- Fix problems with the ar program reported in FSF PR 17533.
Resolves: BZ #1162666, #1162655

View File

@ -1 +1 @@
e0f71a7b2ddab0f8612336ac81d9636b binutils-2.24.tar.bz2
d9f3303f802a5b6b0bb73a335ab89d66 binutils-2.25.tar.bz2