Linker foreign output format support for PowerPC64 ELFv2
authorAlan Modra <amodra@gmail.com>
Tue, 1 Jul 2014 03:36:20 +0000 (13:06 +0930)
committerAlan Modra <amodra@gmail.com>
Tue, 1 Jul 2014 10:54:25 +0000 (20:24 +0930)
commit810d4e754dad3e5431399de7b5bacb831b899320
treef8cf237da60758bc01cc3eb7daafe63b3b63f512
parentf36e88862f94c15a88fa27df7af906ad75a42e7f
Linker foreign output format support for PowerPC64 ELFv2

Makes the ld srec tests pass.  Uses a horrible scan through symbols to
find ELF fields for symbol definitions, but the generic linker doesn't
offer anything better.  Might be slow.  Anyway, sane people will link
to ELF output then objcopy to convert formats.

* elf64-ppc.c (abiversion, set_abiversion): Move earlier.
(ppc64_elf_branch_reloc): Adjust addend for ELFv2 local offset.
(ppc64_elf_set_toc): Set ".TOC." symbol value when using
generic linker.
(ppc64_elf_relocate_section): Disable ELFv2 function entry
optimisation when --traditional-format.
bfd/ChangeLog
bfd/elf64-ppc.c