[GOLD] ppc64 out-of-line register save/restore functions
authorAlan Modra <amodra@gmail.com>
Wed, 2 Sep 2015 06:21:59 +0000 (15:51 +0930)
committerAlan Modra <amodra@gmail.com>
Wed, 2 Sep 2015 06:37:02 +0000 (16:07 +0930)
commitd49044c7530d28894e73763c21c417a423e4297c
tree145bf25f8296e8440e19bed09c825662d396b4f4
parent73c6b4756a7cee53c274ed05fddcd079b8b7e57c
[GOLD] ppc64 out-of-line register save/restore functions

Gold version of a4b6fadd.  Don't emit long branch or plt branch stubs
to save/restore functions.  Copy them instead.

PR 18878
* powerpc.cc (Target_powerpc): Add savres_section_ and accessor.
(Target_powerpc::Branch_info::make_stub): Determine whether long
branch stub is for save/restore function.
(Branch_stub_ent): Add save_res_, and extra parm to constructor.
(Stub_table): Add need_save_res_.
(Stub_table:clear_stubs): Clear need_save_res_.
(Stub_table:set_address_and_size): Add save/restore section size.
(Stub_table::add_long_branch_entry): Add save_res param.  Set
need_save_res_, but don't add space for save/restore stubs.
(Stub_table::find_long_branch_entry): Return offset to local copy
of save/restore func.
(Stub_table::do_write): Don't output save/restore stubs.  Instead
copy the save/restore functions.
(Output_data_save_res:contents): New accessor.
(Target_powerpc::define_save_restore_funcs): Set savres_section_.
gold/ChangeLog
gold/powerpc.cc