diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2020-03-19 21:00:19 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2020-03-19 21:00:58 -0700 |
commit | c3a1714ce7806002726a60c0db09371425fe3097 (patch) | |
tree | 99377ebd529a95e5f653d10d02e48af905d1e3ea /bfd/configure | |
parent | c02d66610b3b79f6fb5052e8890969bc7185b7be (diff) | |
download | binutils-gdb-c3a1714ce7806002726a60c0db09371425fe3097.tar.gz |
plugin: Use LDPT_ADD_SYMBOLS_V2 to get symbol type
Since LTO plugin may generate more than one ltrans.o file from one input
IR object as LTO wrapper ignores -flto-partition=none:
lto-wrapper.c:608:
604 /* Drop arguments that we want to take from the link line. */
605 case OPT_flto_:
606 case OPT_flto:
607 case OPT_flto_partition_:
608 continue;
the LTO wrapper approach is not only slow but also unreliable. Since
the LTO plugin API has been extended to add LDPT_ADD_SYMBOLS_V2 with
symbol type and section kind, we can use LDPT_ADD_SYMBOLS_V2 to get
symbol type, instead of invoking the LTO wrapper.
PR binutils/25640
* plugin.c (plugin_list_entry): Add has_symbol_type.
(add_symbols_v2): New function.
(bfd_plugin_open_input): Don't invoke LTO wrapper if LTO plugin
provides symbol type.
(try_load_plugin): Add LDPT_ADD_SYMBOLS_V2.
(bfd_plugin_canonicalize_symtab): Use LTO plugin symbol type if
available.
Diffstat (limited to 'bfd/configure')
0 files changed, 0 insertions, 0 deletions