diff options
author | Alan Modra <amodra@gmail.com> | 2017-11-02 12:09:34 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2017-11-05 09:37:33 +1030 |
commit | 2e684e75ae3939f5f14fb89ca8a300b610d093dd (patch) | |
tree | c8dffc5f098fcacae31a8e363d141d7f73116b77 /ltsugar.m4 | |
parent | 127e8e9f62ed0e7145dfa1172c6253275fc150dd (diff) | |
download | gdb-2e684e75ae3939f5f14fb89ca8a300b610d093dd.zip gdb-2e684e75ae3939f5f14fb89ca8a300b610d093dd.tar.gz gdb-2e684e75ae3939f5f14fb89ca8a300b610d093dd.tar.bz2 |
hppa-linux TLS relocs
This patch fixes various problems with TLS relocations.
1) Report an error if a symbol has both TLS and normal GOT entries.
2) The GOT entry size calculation was obscure and made use of the fact
that a symbol shouldn't have both normal and TLS GOT entries.
3) The second word of a GD GOT entry sometimes omitted a dynamic
reloc, which was fine except that doing so makes it impossible for
ld.so to differentiate GD and LD entries. Also, a NONE reloc was
emitted.
4) Unnecessary relocs were emitted for GOT entries.
5) GOT relocs didn't take note of UNDEFWEAK_NO_DYNAMIC_RELOC.
* elf32-hppa.c (enum _tls_type): Move.
(struct elf32_hppa_link_hash_entry): Make tls_type a bitfield.
(elf32_hppa_check_relocs): Set DF_STATIC_TLS only for shared libraries.
Tidy tls_type handling. Set symbol tls_type for GOT_TLS_LDM too.
(got_entries_needed, got_relocs_needed): New functions.
(allocate_dynrelocs): Use them.
(elf32_hppa_size_dynamic_sections): Likewise.
(elf32_hppa_relocate_section): Delete bogus FIXME. Formatting.
Correct code emitting relocs on GD/IE got entries. Report an
error when a symbol has both normal and TLS GOT relocs.
Diffstat (limited to 'ltsugar.m4')
0 files changed, 0 insertions, 0 deletions