RFC [PATCH 0/2] Use ld_plugin_symbol_type and ld_plugin_symbol_section_flags

H.J. Lu hjl.tools@gmail.com
Wed Mar 18 12:06:36 GMT 2020


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.  There is
a proposal to extend The LTO plugin API to add LDPT_ADD_SYMBOLS_V2 with
symbol type and section flags:

https://gcc.gnu.org/pipermail/gcc-patches/2020-March/542187.html

We can use the new LTO plugin API to get symbol type, instead of invoking
the LTO wrapper.

H.J. Lu (1):
  Use ld_plugin_symbol_type and ld_plugin_symbol_section_flags

Martin Liska (1):
  Update include/plugin-api.h

 bfd/plugin.c         | 66 ++++++++++++++++++++++++++++++++++----------
 include/plugin-api.h | 32 +++++++++++++++++++--
 2 files changed, 82 insertions(+), 16 deletions(-)

-- 
2.25.1




More information about the Binutils mailing list