[GOLD] Power10 stub selection
authorAlan Modra <amodra@gmail.com>
Thu, 23 Jul 2020 01:05:56 +0000 (10:35 +0930)
committerAlan Modra <amodra@gmail.com>
Mon, 27 Jul 2020 13:01:37 +0000 (22:31 +0930)
commitafd2ea23626c43886ab8b028b68b7b663d6de3c6
tree655c431b1a433cdb530774e781b47077633e740e
parent608d61c20245aa71875f8631bb799ee2d0372d40
[GOLD] Power10 stub selection

gold version of commit e10a07b32dc1.

* options.h (DEFINE_enum): Add optional_arg__ param, adjust
all uses.
(General_options): Add --power10-stubs and --no-power10-stubs.
* options.cc (General_options::finalize): Handle --power10-stubs.
* powerpc.cc (set_power10_stubs): Don't set when --power10-stubs=no.
(power10_stubs_auto): New.
(struct Plt_stub_ent): Add toc_ and tocoff_.  Don't use a bitfield
for indx_.
(struct Branch_stub_ent): Add toc_and tocoff_.  Use bitfields for
iter_, notoc_ and save_res_.
(add_plt_call_entry): Set toc_.  Adjust resizing conditions for
--power10-stubs=auto.
(add_long_branch_entry): Set toc_.
(add_eh_frame, define_stub_syms): No longer use const_iterators
for plt and long branch stub iteration.
(build_tls_opt_head, build_tls_opt_tail): Change parameters and
return value.  Move tests for __tls_get_addr to callers.
(plt_call_size): Handle --power10-stubs=auto.
(branch_stub_size): Likewise.
(Stub_table::do_write): Likewise.
(relocate): Likewise.
gold/ChangeLog
gold/options.cc
gold/options.h
gold/powerpc.cc