aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-arm.c
diff options
context:
space:
mode:
authorRenlin Li <renlin.li@arm.com>2017-09-25 11:41:54 +0100
committerRenlin Li <renlin.li@arm.com>2017-10-10 16:18:07 +0100
commit6c699715f68be7d8c468e965fbefce997f7ed937 (patch)
tree2f63e54c9b5ca2a5fda84b9aa6c663a80359e923 /bfd/elf32-arm.c
parentae7e78255666733d238e676a0bab14986a1483dd (diff)
downloadgdb-6c699715f68be7d8c468e965fbefce997f7ed937.zip
gdb-6c699715f68be7d8c468e965fbefce997f7ed937.tar.gz
gdb-6c699715f68be7d8c468e965fbefce997f7ed937.tar.bz2
[ARM] PR ld/21402, only override the symbol dynamic decision on undefined weak symbol.
Similar as aarch64 backend, arm backend only overrides the decision on undefined weak symbols. arm backend part already emits necessary relative relocation for this case. bfd/ PR ld/21402 * elf32-arm.c (allocate_dynrelocs_for_symbol): Only make undefined weak symbols into dynamic. ld/ PR ld/21402 * testsuite/ld-arm/tls-app.d: Update address. * testsuite/ld-arm/tls-app.r: Remove relocations. * testsuite/ld-arm/unresolved-1-dyn.d: Update.
Diffstat (limited to 'bfd/elf32-arm.c')
-rw-r--r--bfd/elf32-arm.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index bad8540..f841da7 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -15443,8 +15443,8 @@ allocate_dynrelocs_for_symbol (struct elf_link_hash_entry *h, void * inf)
{
/* Make sure this symbol is output as a dynamic symbol.
Undefined weak syms won't yet be marked as dynamic. */
- if (h->dynindx == -1
- && !h->forced_local)
+ if (h->dynindx == -1 && !h->forced_local
+ && h->root.type == bfd_link_hash_undefweak)
{
if (! bfd_elf_link_record_dynamic_symbol (info, h))
return FALSE;
@@ -15531,8 +15531,8 @@ allocate_dynrelocs_for_symbol (struct elf_link_hash_entry *h, void * inf)
/* Make sure this symbol is output as a dynamic symbol.
Undefined weak syms won't yet be marked as dynamic. */
- if (h->dynindx == -1
- && !h->forced_local)
+ if (h->dynindx == -1 && !h->forced_local
+ && h->root.type == bfd_link_hash_undefweak)
{
if (! bfd_elf_link_record_dynamic_symbol (info, h))
return FALSE;
@@ -15755,8 +15755,8 @@ allocate_dynrelocs_for_symbol (struct elf_link_hash_entry *h, void * inf)
{
/* Make sure this symbol is output as a dynamic symbol.
Undefined weak syms won't yet be marked as dynamic. */
- if (h->dynindx == -1
- && !h->forced_local)
+ if (h->dynindx == -1 && !h->forced_local
+ && h->root.type == bfd_link_hash_undefweak)
{
if (! bfd_elf_link_record_dynamic_symbol (info, h))
return FALSE;