Support R_PPC64_ADDR64_LOCAL
authorAlan Modra <amodra@gmail.com>
Wed, 5 Mar 2014 09:27:39 +0000 (19:57 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 5 Mar 2014 09:27:39 +0000 (19:57 +1030)
commit45965137bee4946dca3cd99285f2a7afe6b99aeb
tree7b7808e61693fd88c2234cce50114a6666e706d6
parenta0593ad95626fddd6777a418feb3dd3722e1ef66
Support R_PPC64_ADDR64_LOCAL

This adds support for "func@localentry", an expression that returns the
ELFv2 local entry point address of function "func".  I've excluded
dynamic relocation support because that obviously would require glibc
changes.

include/elf/
* ppc64.h (R_PPC64_REL24_NOTOC, R_PPC64_ADDR64_LOCAL): Define.
bfd/
* elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_ADDR64_LOCAL entry.
(ppc64_elf_reloc_type_lookup): Support R_PPC64_ADDR64_LOCAL.
(ppc64_elf_check_relocs): Likewise.
(ppc64_elf_relocate_section): Likewise.
* Add BFD_RELOC_PPC64_ADDR64_LOCAL.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenerate.
gas/
* config/tc-ppc.c (ppc_elf_suffix): Support @localentry.
(md_apply_fix): Support R_PPC64_ADDR64_LOCAL.
ld/testsuite/
* ld-powerpc/elfv2-2a.s, ld-powerpc/elfv2-2b.s: New files.
* ld-powerpc/elfv2-2exe.d, ld-powerpc/elfv2-2so.d: New files.
* ld-powerpc/powerpc.exp: Run new test.
elfcpp/
* powerpc.h (R_PPC64_REL24_NOTOC, R_PPC64_ADDR64_LOCAL): Define.
gold/
* powerpc.cc (Target_powerpc::Scan::local, global): Support
R_PPC64_ADDR64_LOCAL.
(Target_powerpc::Relocate::relocate): Likewise.
19 files changed:
bfd/ChangeLog
bfd/bfd-in2.h
bfd/elf64-ppc.c
bfd/libbfd.h
bfd/reloc.c
elfcpp/ChangeLog
elfcpp/powerpc.h
gas/ChangeLog
gas/config/tc-ppc.c
gold/ChangeLog
gold/powerpc.cc
include/elf/ChangeLog
include/elf/ppc64.h
ld/testsuite/ChangeLog
ld/testsuite/ld-powerpc/elfv2-2a.s [new file with mode: 0644]
ld/testsuite/ld-powerpc/elfv2-2b.s [new file with mode: 0644]
ld/testsuite/ld-powerpc/elfv2-2exe.d [new file with mode: 0644]
ld/testsuite/ld-powerpc/elfv2-2so.d [new file with mode: 0644]
ld/testsuite/ld-powerpc/powerpc.exp