diff options
author | Alan Modra <amodra@gmail.com> | 2019-06-03 11:48:43 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2019-07-13 09:57:50 +0930 |
commit | e4dff7651becba48d805e39655138f7f6ca30485 (patch) | |
tree | 24f049111d289a14a6001c7b325c4f421445b7a7 /elfcpp | |
parent | [GOLD] PowerPC notoc eh_frame (diff) | |
download | binutils-gdb-e4dff7651becba48d805e39655138f7f6ca30485.tar.gz binutils-gdb-e4dff7651becba48d805e39655138f7f6ca30485.tar.bz2 binutils-gdb-e4dff7651becba48d805e39655138f7f6ca30485.zip |
[GOLD] PowerPC relocations for prefix insns
Also use pc-relative instructions for notoc stubs.
elfcpp/
* powerpc.h (R_PPC64_PCREL_OPT, R_PPC64_D34, R_PPC64_D34_LO),
(R_PPC64_D34_HI30, R_PPC64_D34_HA30, R_PPC64_PCREL34),
(R_PPC64_GOT_PCREL34, R_PPC64_PLT_PCREL34, R_PPC64_PLT_PCREL34_NOTOC),
(R_PPC64_ADDR16_HIGHER34, R_PPC64_ADDR16_HIGHERA34),
(R_PPC64_ADDR16_HIGHEST34, R_PPC64_ADDR16_HIGHESTA34),
(R_PPC64_REL16_HIGHER34, R_PPC64_REL16_HIGHERA34),
(R_PPC64_REL16_HIGHEST34, R_PPC64_REL16_HIGHESTA34),
(R_PPC64_D28, R_PPC64_PCREL28): Define.
gold/
* powerpc.cc (Target_powerpc): Add powerxx_stubs_ and accessor
functions.
(Target_powerpc::maybe_skip_tls_get_addr_call): Handle PLT_PCREL34
and PLT_PCREL34_NOTOC relocs.
(Powerpc_relocate_functions): Add addr34, addr34_hi, addr34_ha,
addr28, addr16_higher34, addr16_highera34, addr16_highest34,
addr16_highest34a functions.
(li_11_0, ori_11_11_0, sldi_11_11_34): Define.
(paddi_12_pc, pld_12_pc, pnop): Define.
(d34, ha34): New inline functions.
(Stub_table::add_plt_call_entry): Handle powerxx_stubs.
(Stub_table::add_eh_frame): Likewise.
(build_powerxx_offset): New function.
(Stub_table::plt_call_size): Handle powerxx_stubs.
(Stub_table::branch_stub_size): Likewise.
(Stub_table::do_write): Likewise.
(Target_powerpc::Scan::get_reference_flags): Handle new relocs.
(Target_powerpc::Scan::reloc_needs_plt_for_ifunc: Likewise.
(Target_powerpc::Scan::local, global, relocate): Likewise.
Diffstat (limited to 'elfcpp')
-rw-r--r-- | elfcpp/ChangeLog | 11 | ||||
-rw-r--r-- | elfcpp/powerpc.h | 20 |
2 files changed, 31 insertions, 0 deletions
diff --git a/elfcpp/ChangeLog b/elfcpp/ChangeLog index b2409388338..724c95a5044 100644 --- a/elfcpp/ChangeLog +++ b/elfcpp/ChangeLog @@ -1,5 +1,16 @@ 2019-07-13 Alan Modra <amodra@gmail.com> + * powerpc.h (R_PPC64_PCREL_OPT, R_PPC64_D34, R_PPC64_D34_LO), + (R_PPC64_D34_HI30, R_PPC64_D34_HA30, R_PPC64_PCREL34), + (R_PPC64_GOT_PCREL34, R_PPC64_PLT_PCREL34, R_PPC64_PLT_PCREL34_NOTOC), + (R_PPC64_ADDR16_HIGHER34, R_PPC64_ADDR16_HIGHERA34), + (R_PPC64_ADDR16_HIGHEST34, R_PPC64_ADDR16_HIGHESTA34), + (R_PPC64_REL16_HIGHER34, R_PPC64_REL16_HIGHERA34), + (R_PPC64_REL16_HIGHEST34, R_PPC64_REL16_HIGHESTA34), + (R_PPC64_D28, R_PPC64_PCREL28): Define. + +2019-07-13 Alan Modra <amodra@gmail.com> + * powerpc.h (R_PPC64_PLTSEQ_NOTOC, R_PPC64_PLTCALL_NOTOC): Define. 2019-06-28 Alan Modra <amodra@gmail.com> diff --git a/elfcpp/powerpc.h b/elfcpp/powerpc.h index 5e5e39abd81..d06eba44b7c 100644 --- a/elfcpp/powerpc.h +++ b/elfcpp/powerpc.h @@ -183,6 +183,26 @@ enum R_POWERPC_PLTCALL = 120, R_PPC64_PLTSEQ_NOTOC = 121, R_PPC64_PLTCALL_NOTOC = 122, + R_PPC64_PCREL_OPT = 123, + + R_PPC64_D34 = 128, + R_PPC64_D34_LO = 129, + R_PPC64_D34_HI30 = 130, + R_PPC64_D34_HA30 = 131, + R_PPC64_PCREL34 = 132, + R_PPC64_GOT_PCREL34 = 133, + R_PPC64_PLT_PCREL34 = 134, + R_PPC64_PLT_PCREL34_NOTOC = 135, + R_PPC64_ADDR16_HIGHER34 = 136, + R_PPC64_ADDR16_HIGHERA34 = 137, + R_PPC64_ADDR16_HIGHEST34 = 138, + R_PPC64_ADDR16_HIGHESTA34 = 139, + R_PPC64_REL16_HIGHER34 = 140, + R_PPC64_REL16_HIGHERA34 = 141, + R_PPC64_REL16_HIGHEST34 = 142, + R_PPC64_REL16_HIGHESTA34 = 143, + R_PPC64_D28 = 144, + R_PPC64_PCREL28 = 145, R_PPC_VLE_REL8 = 216, R_PPC_VLE_REL15 = 217, |