diff options
author | Alan Modra <amodra@gmail.com> | 2014-03-05 19:57:39 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2014-03-05 19:57:39 +1030 |
commit | 45965137bee4946dca3cd99285f2a7afe6b99aeb (patch) | |
tree | 7b7808e61693fd88c2234cce50114a6666e706d6 /gas | |
parent | a0593ad95626fddd6777a418feb3dd3722e1ef66 (diff) | |
download | gdb-45965137bee4946dca3cd99285f2a7afe6b99aeb.zip gdb-45965137bee4946dca3cd99285f2a7afe6b99aeb.tar.gz gdb-45965137bee4946dca3cd99285f2a7afe6b99aeb.tar.bz2 |
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.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/config/tc-ppc.c | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index dae0368..0549f39 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,10 @@ 2014-03-05 Alan Modra <amodra@gmail.com> + * config/tc-ppc.c (ppc_elf_suffix): Support @localentry. + (md_apply_fix): Support R_PPC64_ADDR64_LOCAL. + +2014-03-05 Alan Modra <amodra@gmail.com> + * config/tc-ppc.c (md_assemble): Move code adjusting reloc types later. Merge absolute and relative branch reloc selection. Generate 16-bit relocs for most 16-bit insn fields given a diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c index 6ffbe13..838f522 100644 --- a/gas/config/tc-ppc.c +++ b/gas/config/tc-ppc.c @@ -1952,6 +1952,7 @@ ppc_elf_suffix (char **str_p, expressionS *exp_p) MAP64 ("dtprel@highera", BFD_RELOC_PPC64_DTPREL16_HIGHERA), MAP64 ("dtprel@highest", BFD_RELOC_PPC64_DTPREL16_HIGHEST), MAP64 ("dtprel@highesta", BFD_RELOC_PPC64_DTPREL16_HIGHESTA), + MAP64 ("localentry", BFD_RELOC_PPC64_ADDR64_LOCAL), MAP64 ("tprel@high", BFD_RELOC_PPC64_TPREL16_HIGH), MAP64 ("tprel@higha", BFD_RELOC_PPC64_TPREL16_HIGHA), MAP64 ("tprel@higher", BFD_RELOC_PPC64_TPREL16_HIGHER), @@ -6844,6 +6845,7 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED) case BFD_RELOC_PPC64_HIGHEST_S: case BFD_RELOC_PPC64_ADDR16_HIGH: case BFD_RELOC_PPC64_ADDR16_HIGHA: + case BFD_RELOC_PPC64_ADDR64_LOCAL: break; case BFD_RELOC_PPC_DTPMOD: |