summaryrefslogtreecommitdiff
path: root/bfd/elflink.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2012-10-30 12:44:53 +0000
committerNick Clifton <nickc@redhat.com>2012-10-30 12:44:53 +0000
commitcd49363b8ae1725522ea29ccc0dda7b138f3d5aa (patch)
treea9f3c57096008cb966b73eb2d7de91849114973c /bfd/elflink.c
parent14d6cf09f6eea18061f270bc33e9eb4ffc6a8fcf (diff)
downloadbinutils-redhat-cd49363b8ae1725522ea29ccc0dda7b138f3d5aa.tar.gz
bfd:
* elf32-arm.c (elf32_arm_print_private_bfd_data): Recognise and display the new ARM hard-float/soft-float ABI flags for EABI_VER5 (elf32_arm_post_process_headers): Add the hard-float/soft-float ABI flag as appropriate for ET_DYN/ET_EXEC in EABI_VER5. binutils: * readelf.c (decode_ARM_machine_flags): Recognise and display the new ARM hard-float/soft-float ABI flags for EABI_VER5. Split out the code for EABI_VER4 and EABI_VER5 to allow this. elfcpp: * arm.h: New enum for EABI soft- and hard-float flags. gold: * gold.cc (Target_arm::do_adjust_elf_header): Add the hard-float/soft-float ABI flag as appropriate for ET_DYN/ET_EXEC in EABI_VER5. include: * elf/arm.h (EF_ARM_ABI_FLOAT_SOFT): New define. (EF_ARM_ABI_FLOAT_HARD): Likewise. ld/testsuite: * ld-arm/eabi-hard-float.s: New test source. * ld-arm/eabi-soft-float.s: New test source. * ld-arm/eabi-hard-float.d: New test. * ld-arm/eabi-soft-float.d: New test. * ld-arm/eabi-soft-float-ABI4.d: New test. * ld-arm/eabi-soft-float-r.d: New test. * ld-arm/arm-elf.xp: Use the new tests. binutils: PR binutils/14779 * configure.in: Add checks for wchar.h and mbstate_t. * config.in: Regenerate. * configure: Regenerate. * readelf.c: Conditionally include wchar.h. (print_symbol): Conditionally use mbstate_t.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r--bfd/elflink.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index f22e023df8..2fcbac3e06 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -4394,6 +4394,8 @@ error_free_dyn:
{
h->def_dynamic = 0;
h->ref_dynamic = 1;
+ /* PR 12549: Note if the dynamic reference is weak. */
+ h->ref_dynamic_nonweak = (bind != STB_WEAK);
}
}
@@ -4411,6 +4413,9 @@ error_free_dyn:
{
h->ref_dynamic = 1;
hi->ref_dynamic = 1;
+ /* PR 12549: Note if the dynamic reference is weak. */
+ hi->ref_dynamic_nonweak =
+ h->ref_dynamic_nonweak = (bind != STB_WEAK);
}
else
{
@@ -4498,8 +4503,8 @@ error_free_dyn:
if (!add_needed
&& definition
&& ((dynsym
- && h->ref_regular)
- || (h->ref_dynamic
+ && h->ref_regular_nonweak)
+ || (h->ref_dynamic_nonweak
&& (elf_dyn_lib_class (abfd) & DYN_AS_NEEDED) != 0
&& !on_needed_list (elf_dt_name (abfd), htab->needed))))
{