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.
This commit is contained in:
parent
94092126a0
commit
e601d38b7c
10 changed files with 38 additions and 6 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2017-10-25 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
* archive.c (_bfd_compute_and_write_armap): Match "__gnu_lto_slim"
|
||||||
|
optionally prefixed with "_".
|
||||||
|
* linker.c (_bfd_generic_link_add_one_symbol): Likewise.
|
||||||
|
|
||||||
2017-10-24 Andrew Waterman <andrew@sifive.com>
|
2017-10-24 Andrew Waterman <andrew@sifive.com>
|
||||||
|
|
||||||
* elfnn-riscv.c (_bfd_riscv_relax_lui): Don't relax to c.lui
|
* elfnn-riscv.c (_bfd_riscv_relax_lui): Don't relax to c.lui
|
||||||
|
|
|
@ -2411,7 +2411,11 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength)
|
||||||
map = new_map;
|
map = new_map;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp (syms[src_count]->name, "__gnu_lto_slim") == 0)
|
if (syms[src_count]->name[0] == '_'
|
||||||
|
&& syms[src_count]->name[1] == '_'
|
||||||
|
&& strcmp (syms[src_count]->name
|
||||||
|
+ (syms[src_count]->name[2] == '_'),
|
||||||
|
"__gnu_lto_slim") == 0)
|
||||||
_bfd_error_handler
|
_bfd_error_handler
|
||||||
(_("%B: plugin needed to handle lto object"),
|
(_("%B: plugin needed to handle lto object"),
|
||||||
current);
|
current);
|
||||||
|
|
|
@ -1403,7 +1403,9 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info,
|
||||||
{
|
{
|
||||||
row = COMMON_ROW;
|
row = COMMON_ROW;
|
||||||
if (!bfd_link_relocatable (info)
|
if (!bfd_link_relocatable (info)
|
||||||
&& strcmp (name, "__gnu_lto_slim") == 0)
|
&& name[0] == '_'
|
||||||
|
&& name[1] == '_'
|
||||||
|
&& strcmp (name + (name[2] == '_'), "__gnu_lto_slim") == 0)
|
||||||
_bfd_error_handler
|
_bfd_error_handler
|
||||||
(_("%B: plugin needed to handle lto object"), abfd);
|
(_("%B: plugin needed to handle lto object"), abfd);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2017-10-25 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
* nm.c (filter_symbols): Match "__gnu_lto_slim" optionally prefixed
|
||||||
|
with "_".
|
||||||
|
|
||||||
2017-10-18 Eric Botcazou <ebotcazou@adacore.com>
|
2017-10-18 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
* MAINTAINERS: Add myself as Visium maintainer.
|
* MAINTAINERS: Add myself as Visium maintainer.
|
||||||
|
|
|
@ -478,7 +478,9 @@ filter_symbols (bfd *abfd, bfd_boolean is_dynamic, void *minisyms,
|
||||||
if (sym == NULL)
|
if (sym == NULL)
|
||||||
bfd_fatal (bfd_get_filename (abfd));
|
bfd_fatal (bfd_get_filename (abfd));
|
||||||
|
|
||||||
if (strcmp (sym->name, "__gnu_lto_slim") == 0)
|
if (sym->name[0] == '_'
|
||||||
|
&& sym->name[1] == '_'
|
||||||
|
&& strcmp (sym->name + (sym->name[2] == '_'), "__gnu_lto_slim") == 0)
|
||||||
non_fatal (_("%s: plugin needed to handle lto object"),
|
non_fatal (_("%s: plugin needed to handle lto object"),
|
||||||
bfd_get_filename (abfd));
|
bfd_get_filename (abfd));
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2017-10-25 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
* symtab.cc (Symbol_table::add_from_relobj): Match "__gnu_lto_slim"
|
||||||
|
optionally prefixed with "_".
|
||||||
|
|
||||||
2017-10-20 Sriraman Tallam <tmsriram@google.com>
|
2017-10-20 Sriraman Tallam <tmsriram@google.com>
|
||||||
|
|
||||||
* options.h (-z,text_unlikely_segment): New option.
|
* options.h (-z,text_unlikely_segment): New option.
|
||||||
|
|
|
@ -1185,7 +1185,9 @@ Symbol_table::add_from_relobj(
|
||||||
const char* name = sym_names + st_name;
|
const char* name = sym_names + st_name;
|
||||||
|
|
||||||
if (!parameters->options().relocatable()
|
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"),
|
gold_info(_("%s: plugin needed to handle lto object"),
|
||||||
relobj->name().c_str());
|
relobj->name().c_str());
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
2017-10-25 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
* testsuite/ld-plugin/lto-3r.d: Match "__gnu_lto_v" optionally
|
||||||
|
prefixed with "_".
|
||||||
|
* testsuite/ld-plugin/lto-5r.d: Likewise.
|
||||||
|
|
||||||
2017-10-25 Hans-Peter Nilsson <hp@axis.com>
|
2017-10-25 Hans-Peter Nilsson <hp@axis.com>
|
||||||
|
|
||||||
* testsuite/ld-riscv-elf/ld-riscv-elf.exp: Fix typo for istarget.
|
* testsuite/ld-riscv-elf/ld-riscv-elf.exp: Fix typo for istarget.
|
||||||
|
|
|
@ -3,5 +3,5 @@
|
||||||
#nm: -p
|
#nm: -p
|
||||||
|
|
||||||
#...
|
#...
|
||||||
[0-9a-f]+ C __gnu_lto_v.*
|
[0-9a-f]+ C _?__gnu_lto_v.*
|
||||||
#pass
|
#pass
|
||||||
|
|
|
@ -3,5 +3,5 @@
|
||||||
#nm: -p
|
#nm: -p
|
||||||
|
|
||||||
#...
|
#...
|
||||||
[0-9a-f]+ C __gnu_lto_v.*
|
[0-9a-f]+ C _?__gnu_lto_v.*
|
||||||
#pass
|
#pass
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue