aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog9
-rw-r--r--bfd/elf-bfd.h2
-rw-r--r--bfd/elf32-arm.c19
-rw-r--r--bfd/elflink.c9
4 files changed, 36 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index d846f63..56b40c5 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,7 +1,14 @@
+2012-10-30 Steve McIntyre <steve.mcintyre@linaro.org>
+
+ * 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.
+
2012-10-30 Yao Qi <yao@codesourcery.com>
H.J. Lu <hongjiu.lu@intel.com>
- * configure.in: Set CORE_HEADER to hosts/x86-64linux.h for
+ * configure.in: Set CORE_HEADER to hosts/x86-64linux.h for
'i[3-7]86-*-linux-*' if x86_64-*linux is enabled.
* configure: Regenerated.
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index b8d82b1..aa78ecd 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -168,6 +168,8 @@ struct elf_link_hash_entry
/* Symbol has a non-weak reference from a non-shared object (other than
the object in which it is defined). */
unsigned int ref_regular_nonweak : 1;
+ /* Symbol has a non-weak reference from a shared object. */
+ unsigned int ref_dynamic_nonweak : 1;
/* Dynamic symbol has been adjustd. */
unsigned int dynamic_adjusted : 1;
/* Symbol needs a copy reloc. */
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 633bb64..fefc7db 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -12110,6 +12110,15 @@ elf32_arm_print_private_bfd_data (bfd *abfd, void * ptr)
case EF_ARM_EABI_VER5:
fprintf (file, _(" [Version5 EABI]"));
+
+ if (flags & EF_ARM_ABI_FLOAT_SOFT)
+ fprintf (file, _(" [soft-float ABI]"));
+
+ if (flags & EF_ARM_ABI_FLOAT_HARD)
+ fprintf (file, _(" [hard-float ABI]"));
+
+ flags &= ~(EF_ARM_ABI_FLOAT_SOFT | EF_ARM_ABI_FLOAT_HARD);
+
eabi:
if (flags & EF_ARM_BE8)
fprintf (file, _(" [BE8]"));
@@ -14417,6 +14426,16 @@ elf32_arm_post_process_headers (bfd * abfd, struct bfd_link_info * link_info ATT
if (globals != NULL && globals->byteswap_code)
i_ehdrp->e_flags |= EF_ARM_BE8;
}
+
+ if (EF_ARM_EABI_VERSION (i_ehdrp->e_flags) == EF_ARM_EABI_VER5
+ && ((i_ehdrp->e_type == ET_DYN) || (i_ehdrp->e_type == ET_EXEC)))
+ {
+ int abi = bfd_elf_get_obj_attr_int (abfd, OBJ_ATTR_PROC, Tag_ABI_VFP_args);
+ if (abi)
+ i_ehdrp->e_flags |= EF_ARM_ABI_FLOAT_HARD;
+ else
+ i_ehdrp->e_flags |= EF_ARM_ABI_FLOAT_SOFT;
+ }
}
static enum elf_reloc_type_class
diff --git a/bfd/elflink.c b/bfd/elflink.c
index f22e023..2fcbac3 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))))
{