* elf64-ppc.c (struct _ppc64_elf_section_data): Delete t_symndx,
authorAlan Modra <amodra@gmail.com>
Sun, 15 Feb 2009 12:14:14 +0000 (12:14 +0000)
committerAlan Modra <amodra@gmail.com>
Sun, 15 Feb 2009 12:14:14 +0000 (12:14 +0000)
commit3a71aa26df2a372a58e9c11ef9ba51fd0e83320a
treedabb80968494c1e18ec5fd2ac0fac8990ba82a40
parentf007ec5895011d3f7e39cf51f1d548303a7d15cf
* elf64-ppc.c (struct _ppc64_elf_section_data): Delete t_symndx,
add toc.symndx and toc.add.
(ppc64_elf_check_relocs): Don't set htab->tls_get_addr here.
Set up toc.add.
(get_tls_mask): Add toc_addend param, set from toc.add.  Adjust all
callers.
(ppc64_elf_tls_setup): Set htab->tls_get_addr and tls_get_addr_fd.
(branch_reloc_hash_match): New function, extracted from..
(ppc64_elf_tls_optimize): ..here.
(ppc64_elf_relocate_section): Properly set addends when optimizing
tls sequences.  Avoid unnecessary reading and writing of insns.
Only redo reloc when symbol changed.  Bypass symbol checks when
using tlsld_got.
* elf32-ppc.c (ppc_elf_tls_setup): Correct comment.
(branch_reloc_hash_match): New function, extracted from..
(ppc_elf_tls_optimize): ..here.
(ppc_elf_relocate_section): Avoid unnecessary reading of insns.
Don't clear addend on zapped __tls_get_addr reloc.
bfd/ChangeLog
bfd/elf32-ppc.c
bfd/elf64-ppc.c