diff options
author | Alan Modra <amodra@gmail.com> | 2017-06-23 20:37:34 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2017-06-23 20:37:34 +0930 |
commit | 7e57d19e48f94ff9a19a9413cf25d1887e3a7f52 (patch) | |
tree | af0f7843a53e5a1458a73e358666df04257f316f /COPYING.LIB | |
parent | 0e158763b0c5671cd40cdd2faee48d6659489ddd (diff) | |
download | gdb-7e57d19e48f94ff9a19a9413cf25d1887e3a7f52.zip gdb-7e57d19e48f94ff9a19a9413cf25d1887e3a7f52.tar.gz gdb-7e57d19e48f94ff9a19a9413cf25d1887e3a7f52.tar.bz2 |
[GOLD] PowerPC64 tocsave
This adds support to gold for the tocsave relocs already supported by
ld.bfd. R_PPC64_TOCSAVE relocs are part of a scheme to move r2 saves
to the prologue of a function rather than in each plt call stub. We
don't want a compiler to always emit the r2 save, as this would be
wasted if the calls turned out to be local. See the tocsave*.s in
ld/testsuite/ld-powerpc/.
* powerpc.cc (Target_powerpc::tocsave_loc_): New var.
(Target_powerpc::mark_pltcall, add_tocsave, tocsave_loc): New functions.
(Target_powerpc::Branch_info::tocsave_): New var.
(Target_powerpc::Branch_info::mark_pltcall): New function.
(Target_powerpc::Branch_info::make_stub): Pass tocsave_ to
add_plt_call_entry.
(Stub_table::Plt_stub_ent): Make public. Add r2save_.
(Stub_table::add_plt_call_entry): Add bool tocsave_ param. Set
r2save_.
(Stub_table::find_plt_call_entry): Return Plt_stub_ent*. Adjust
use throughout.
(Stub_table::do_write): Conditionally output r2 save in plt stubs.
(Target_powerpc::Scan::local): Handle R_PPC64_TOCSAVE.
(Target_powerpc::Scan::global): Likewise.
(Target_powerpc::Relocate::relocate): Skip r2 save in plt call stub
with tocsave reloc. Replace header tocsave nop with r2 save.
* symtab.h (struct Symbol_location_hash): Make public.
Diffstat (limited to 'COPYING.LIB')
0 files changed, 0 insertions, 0 deletions