[Bug lto/82757] [8 regression] r251560 causes: plugin needed to handle lto object
rguenther at suse dot de
gcc-bugzilla@gcc.gnu.org
Mon Oct 30 10:26:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82757
--- Comment #6 from rguenther at suse dot de <rguenther at suse dot de> ---
On Mon, 30 Oct 2017, amodra at gmail dot com wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82757
>
> --- Comment #5 from Alan Modra <amodra at gmail dot com> ---
> Incidentally, the only reason ld.bfd gets past the "plugin needed" warning is
> that it only warns on a common symbol called __gnu_lto_slim, not an undefined
> one.. Bump st_name by one for __gnu_lto_ symbols, perhaps?
I guess that would work. We already handle __gnu_lto_ symbols
specially by making them hidden.
Index: libiberty/simple-object-elf.c
===================================================================
--- libiberty/simple-object-elf.c (revision 254211)
+++ libiberty/simple-object-elf.c (working copy)
@@ -1384,7 +1384,12 @@ simple_object_elf_copy_lto_debug_section
&& p[1] == '_'
&& strncmp (p + (p[2] == '_'),
"__gnu_lto_", 10) == 0)
- other = STV_HIDDEN;
+ {
+ other = STV_HIDDEN;
+ ELF_SET_FIELD (type_functions, ei_class,
Sym,
+ ent, st_name, Elf_Word,
+ st_name + 1);
+ }
}
}
*st_other = other;
More information about the Gcc-bugs
mailing list