hppa-linux TLS relocs
authorAlan Modra <amodra@gmail.com>
Thu, 2 Nov 2017 01:39:34 +0000 (12:09 +1030)
committerAlan Modra <amodra@gmail.com>
Sat, 4 Nov 2017 23:07:33 +0000 (09:37 +1030)
commit2e684e75ae3939f5f14fb89ca8a300b610d093dd
treec8dffc5f098fcacae31a8e363d141d7f73116b77
parent127e8e9f62ed0e7145dfa1172c6253275fc150dd
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.
bfd/ChangeLog
bfd/elf32-hppa.c
This page took 0.028226 seconds and 4 git commands to generate.