From e601d38b7cc222345d4128f45db18529b9fb477b Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 25 Oct 2017 15:32:52 +1030 Subject: Allow for __gnu_lto_slim prefixed with extra "_" Some targets prefix global symbols with "_". bfd/ * archive.c (_bfd_compute_and_write_armap): Match "__gnu_lto_slim" optionally prefixed with "_". * linker.c (_bfd_generic_link_add_one_symbol): Likewise. binutils/ * nm.c (filter_symbols): Match "__gnu_lto_slim" optionally prefixed with "_". gold/ * symtab.cc (Symbol_table::add_from_relobj): Match "__gnu_lto_slim" optionally prefixed with "_". ld/ * testsuite/ld-plugin/lto-3r.d: Match "__gnu_lto_v" optionally prefixed with "_". * testsuite/ld-plugin/lto-5r.d: Likewise. --- gold/symtab.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gold/symtab.cc') diff --git a/gold/symtab.cc b/gold/symtab.cc index 1555de6e5b3..7ebcd6b5682 100644 --- a/gold/symtab.cc +++ b/gold/symtab.cc @@ -1185,7 +1185,9 @@ Symbol_table::add_from_relobj( const char* name = sym_names + st_name; if (!parameters->options().relocatable() - && strcmp (name, "__gnu_lto_slim") == 0) + && name[0] == '_' + && name[1] == '_' + && strcmp (name + (name[2] == '_'), "__gnu_lto_slim") == 0) gold_info(_("%s: plugin needed to handle lto object"), relobj->name().c_str()); -- cgit v1.2.1