diff options
author | Alan Modra <amodra@gmail.com> | 2022-01-26 10:31:36 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2022-02-03 13:40:41 +1030 |
commit | 3a3a4c1fe4ccb1914d29fbf8f5930d55aacec78f (patch) | |
tree | d70433071d319f0d23a4f09aa62380be09291430 /gdb/coffread.c | |
parent | 36a13a0e62bc672f59c6d27bc2b963edee32b488 (diff) | |
download | gdb-3a3a4c1fe4ccb1914d29fbf8f5930d55aacec78f.zip gdb-3a3a4c1fe4ccb1914d29fbf8f5930d55aacec78f.tar.gz gdb-3a3a4c1fe4ccb1914d29fbf8f5930d55aacec78f.tar.bz2 |
PowerPC64 treatment of absolute symbols
Supporting -static-pie on PowerPC64 requires the linker to properly
treat SHN_ABS symbols for cases like glibc's _nl_current_LC_CTYPE_used
absolute symbol. I've been slow to fix the linker on powerpc because
there is some chance that this will break some shared libraries or
PIEs.
bfd/
* elf64-ppc.c (ppc64_elf_check_relocs): Consolidate local sym
handling code. Don't count dyn relocs against non-dynamic
absolute symbols.
(dec_dynrel_count): Adjust to suit.
(ppc64_elf_edit_toc): Don't remove entries for absolute symbols
when pic.
(allocate_got): Don't allocate space for got relocs against
non-dynamic absolute syms.
(ppc64_elf_layout_multitoc): Likewise.
(got_and_plt_relr): Likewise.
(ppc64_elf_size_dynamic_sections): Likewise for local got.
(got_and_plt_relr_for_local_syms): Likewise.
(ppc64_elf_size_stubs): Don't allocate space for relr either.
(ppc64_elf_relocate_section): Don't write relocs against non-dynamic
absolute symbols. Don't optimise got and toc code sequences
loading absolute symbol entries.
ld/
* testsuite/ld-powerpc/abs-reloc.s,
* testsuite/ld-powerpc/abs-static.d,
* testsuite/ld-powerpc/abs-static.r,
* testsuite/ld-powerpc/abs-pie.d,
* testsuite/ld-powerpc/abs-pie.r,
* testsuite/ld-powerpc/abs-shared.d,
* testsuite/ld-powerpc/abs-shared.r,
* testsuite/ld-powerpc/abs-pie-relr.d,
* testsuite/ld-powerpc/abs-pie-relr.r,
* testsuite/ld-powerpc/abs-shared-relr.d,
* testsuite/ld-powerpc/abs-shared-relr.r: New tests.
* testsuite/ld-powerpc/powerpc.exp: Run them.
Diffstat (limited to 'gdb/coffread.c')
0 files changed, 0 insertions, 0 deletions