bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/13557] Undef. ref. err. when linking with slim LTO obj. in stati


From: lrn1986 at gmail dot com
Subject: [Bug ld/13557] Undef. ref. err. when linking with slim LTO obj. in static lib. (mingw32 target)
Date: Mon, 28 Apr 2014 21:33:29 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=13557

--- Comment #5 from LRN <lrn1986 at gmail dot com> ---
So far my guess is that the difference is in coff_link_check_ar_symbols():

When a "normal" static library (i've made a version of libfoo.a without -flto)
is being loaded, coff_link_check_ar_symbols() lists all its symbols, finds all
global or common symbols, gets their names, and resolves them, if undefined.
"Normal" libfoo has a global symbol esym == "_foo" (with name "_foo"), which
passes all checks, and eventually is fed to add_archive_element().

LTO libfoo.a does not have that. It has a number of local 'section' symbols
(".text", ".bss" and such), a number of local symbols with esym[0] == 0 and two
common symbols with esym[0] == 0 and names "___gnu_lto_v1" and
"___gnu_lto_slim".
None of them is the right thing, as far as coff_link_check_ar_symbols() is
concerned.

My guess is that a plugin should hook up at some point (i have not been able
the identify the place where this "some point" is in the code) and handle the
symbols, but it doesn't, for some reason.

-- 
You are receiving this mail because:
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]