[GOLD] PPC64_OPT_LOCALENTRY is incompatible with tail calls
authorAlan Modra <amodra@gmail.com>
Sat, 26 Sep 2020 11:04:55 +0000 (20:34 +0930)
committerAlan Modra <amodra@gmail.com>
Sat, 26 Sep 2020 11:04:55 +0000 (20:34 +0930)
commit63e5eea234c2bd2c7ce7dc921c71b22bc4fd0d6b
tree19c8bcb7389691da527dfac714eb6b924ea1f8b1
parent3cd7c7d7ef38ec5dc0a0c137c47d9ad0fc9e2e5f
[GOLD] PPC64_OPT_LOCALENTRY is incompatible with tail calls

Gold version of commit 3cd7c7d7ef.

* powerpc.cc (Target_powerpc): Rename power10_stubs_ to
power10_relocs_.
(Target_powerpc::set_power10_relocs): New accessor.
(Target_powerpc::set_power10_stubs): Delete.
(Target_powerpc::power10_stubs): Adjust.
(Target_powerpc::has_localentry0): New accessor.
(ld_0_11): New constant.
(glink_eh_frame_fde_64v1, glink_eh_frame_fde_64v2): Adjust.
(glink_eh_frame_fde_64v2_localentry0): New.
(Output_data_glink::pltresolve_size): Update.
(Output_data_glink::add_eh_frame): Use localentry0 version eh_frame.
(Output_data_glink::do_write): Move r2 save to start of ELFv2 stub
and only emit for has_localentry0.  Don't use r2 in the stub.
(Target_powerpc::Scan::local, global): Adjust for
set_power10_relocs renaming.
(Target_powerpc::scan_relocs): Warn and reset plt_localentry0_.
gold/ChangeLog
gold/powerpc.cc