diff options
author | Alan Modra <amodra@gmail.com> | 2017-10-25 15:32:52 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2017-10-25 15:32:52 +1030 |
commit | e601d38b7cc222345d4128f45db18529b9fb477b (patch) | |
tree | 79f1755871c5362ca049b2123b7038f2d6787b8f /binutils | |
parent | 94092126a05ee625bf05d48cb331472b8f87d235 (diff) | |
download | gdb-e601d38b7cc222345d4128f45db18529b9fb477b.zip gdb-e601d38b7cc222345d4128f45db18529b9fb477b.tar.gz gdb-e601d38b7cc222345d4128f45db18529b9fb477b.tar.bz2 |
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.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 5 | ||||
-rw-r--r-- | binutils/nm.c | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index ee0b81e..ad9d33b 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -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> * MAINTAINERS: Add myself as Visium maintainer. diff --git a/binutils/nm.c b/binutils/nm.c index 3328812..5b421785 100644 --- a/binutils/nm.c +++ b/binutils/nm.c @@ -478,7 +478,9 @@ filter_symbols (bfd *abfd, bfd_boolean is_dynamic, void *minisyms, if (sym == NULL) 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"), bfd_get_filename (abfd)); |