This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Don't move weak alias dyn_relocs to weakdef
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Thu, 23 Nov 2017 10:00:48 -0500
- Subject: [binutils-gdb] Don't move weak alias dyn_relocs to weakdef
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT 287c7eaf0d90cc1bbb5a5463c665b163c6ee04e7 ***
Author: Alan Modra <amodra@gmail.com>
Branch: master
Commit: 287c7eaf0d90cc1bbb5a5463c665b163c6ee04e7
Don't move weak alias dyn_relocs to weakdef
I did this for powerpc64 a while ago. Not moving weak symbol
dyn_relocs to the strong alias makes for a much simpler test for
dynamic relocs in relocate_section.
This patch implements the change for powerpc and hppa. Other targets
could benefit from similar changes.
* elf32-hppa.c (pc_dynrelocs): Define.
(elf32_hppa_copy_indirect_symbol): Don't copy dyn_relocs to weakdefs.
(alias_readonly_dynrelocs): New function.
(elf32_hppa_adjust_dynamic_symbol): Don't clear non_got_ref to
indicate dyn_relocs should be discarded, discard them here.
Use alias_readonly_dynrelocs.
(allocate_dynrelocs): Don't test or clear non_got_ref.
(elf32_hppa_relocate_section): Simplify test for dynamic relocs.
* elf32-ppc.c (ppc_elf_copy_indirect_symbol): Don't copy dyn_relocs
to weakdefs.
(alias_readonly_dynrelocs, pc_dynrelocs): New functions.
(ppc_elf_adjust_dynamic_symbol): Don't clear non_got_ref to
indicate dyn_relocs should be discarded, discard them here.
Use alias_readonly_dynrelocs.
(allocate_dynrelocs): Don't test or clear non_got_ref.
(ppc_elf_relocate_section): Simplify test for dynamic relocs.