aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2024-02-21 13:11:04 +1030
committerAlan Modra <amodra@gmail.com>2024-02-24 11:53:03 +1030
commit9c697157b823b052c6044f676d90a87aea6d173f (patch)
tree3f1dae591eb1f8f02c5d4e11bfb9b16d51366d34 /bfd
parent93f83dcc94df9a186d2e5e0f4adcc990318eb480 (diff)
downloadgdb-9c697157b823b052c6044f676d90a87aea6d173f.zip
gdb-9c697157b823b052c6044f676d90a87aea6d173f.tar.gz
gdb-9c697157b823b052c6044f676d90a87aea6d173f.tar.bz2
Make is_relocatable_executable only affect dynamic section syms
I believe the only elflink.c specialties for is_relocatable_executable needed by tic6x are those directly related to dynamic section symbols. I might be wrong, the code in record_dynamic_symbol and record_link_assignment predated the tic6x port, but I think these were symbian specific hacks. The shlib-app-1* testsuite changes aren't needed for this patch. I started making them when trying to remove is_relocatable_executable completely, but figure it is worth keeping the more permissive address matching for some future generic linker change. The static-app-1* changes also adjust to the fact that an unneeded "c" no longer appears in the dynamic symbol table. bfd/ * elflink.c (bfd_elf_link_record_dynamic_symbol): Don't do anything special for is_relocatable_executable. (bfd_elf_record_link_assignment): Likewise. ld/ * testsuite/ld-tic6x/shlib-app-1.rd: Make some address matching more permissive. * testsuite/ld-tic6x/shlib-app-1b.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1r.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1rb.rd: Likewise. * testsuite/ld-tic6x/static-app-1.rd: Likewise, and adjust expected dynamic symbol table. * testsuite/ld-tic6x/static-app-1b.rd: Likewise. * testsuite/ld-tic6x/static-app-1r.rd: Likewise. * testsuite/ld-tic6x/static-app-1rb.rd: Likewise.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/elflink.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index c2494b3..5a6cb07 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -530,15 +530,7 @@ bfd_elf_link_record_dynamic_symbol (struct bfd_link_info *info,
&& h->root.type != bfd_link_hash_undefweak)
{
h->forced_local = 1;
- if (!elf_hash_table (info)->is_relocatable_executable
- || ((h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- && h->root.u.def.section->owner != NULL
- && h->root.u.def.section->owner->no_export)
- || (h->root.type == bfd_link_hash_common
- && h->root.u.c.p->section->owner != NULL
- && h->root.u.c.p->section->owner->no_export))
- return true;
+ return true;
}
default:
@@ -734,8 +726,7 @@ bfd_elf_record_link_assignment (bfd *output_bfd,
if ((h->def_dynamic
|| h->ref_dynamic
- || bfd_link_dll (info)
- || elf_hash_table (info)->is_relocatable_executable)
+ || bfd_link_dll (info))
&& !h->forced_local
&& h->dynindx == -1)
{