This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug lto/82575] [8 Regression] lto debugobj references __gnu_lto_slim, ld test liblto-17 fails


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82575

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Alan Modra from comment #2)
> Created attachment 42397 [details]
> proposed patch
> 
> I hadn't debugged past grepping for "debugobj" when I created the bugzilla. 
> Now that I've looked further, it seems easy to fix.  At least on linux the
> attached patch cures the problem and should work with other ELF linkers.

Hmm, but those symbols will prevail, enlarging the final symbol table?
Or are weak + hidden symbols removed even for shared libaries?

IIRC the Solaris linker didn't like to interpret "unused" (aka unreferenced)
UNDEF globals as irrelevant, complaining about missing symbols later.  GNU
ld simply discards those in the partial link we perform over all debug
objects.

In the end I might end up writing all the code to really remove entries
from symtab...  No, I don't really like to do that, this was supposed to be
an easy hack for the legacy until somebody fixes the linker plugin interface
so we can claim part of the object and tell the linker to keep a set of
sections for the final link (plus renaming them).

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]