bug-binutils
[Top][All Lists]
Advanced

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

[Bug gold/19842] LTO build fails to write call address for weak symbol r


From: amodra at gmail dot com
Subject: [Bug gold/19842] LTO build fails to write call address for weak symbol reference
Date: Tue, 22 Mar 2016 13:20:39 +0000

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

--- Comment #28 from Alan Modra <amodra at gmail dot com> ---
I was just trying to answer comment #21.  In that narrow context I didn't
understand your mention of "non-LTO object", and thought you must mean a
-ffat-lto-objects file.  So let's forget that, and ignore my comment #26.

BFD ld does weird things with LTO.  This is my recollection of how it goes:  On
the first pass over objects, symbols (from LDPT_ADD_SYMBOLS) are added to the
linker symbol hash table along with symbols from non-LTO objects.  I believe
this is so that we get reasonable behaviour on archive searches and for
--as-needed shared libraries.  The LTO symbols are of course not the final
symbols but only tentative definitions.  When merging symbols, if we see a weak
symbol in a non-LTO object after seeing the tentative definition from an LTO
object, we want the non-LTO symbol to win.  The LTO object might not actually
provide the symbol after recompilation.  Later we load the recompiled LTO
objects, which provide the real symbols.  There are some complicated hacks (see
plugin_notice) to make this all work.

-- 
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]