bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/24873] gcc -flto objects result in --start-group … --end-group f


From: amodra at gmail dot com
Subject: [Bug ld/24873] gcc -flto objects result in --start-group … --end-group failure to include --as-needed libraries
Date: Tue, 06 Aug 2019 05:00:21 +0000

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

--- Comment #10 from Alan Modra <amodra at gmail dot com> ---
OK, so the LTO recompiled object is being inserted before libcheck.a, which is
fine, inside --start-group/--end-group.  However, reloading of archives (and
checking --as-needed DSOs again) is disabled until we hit the plugin insert
point.  It's necessary to do that because in a case like lib1.a lto.o lib2.a
where lib1.a and lib2.a contain duplicate symbols, we want the lto.o recompiled
object to pull in objects from lib2.a as necessary, but not from lib1.a. 
Unfortunately this heuristic fails when the insert point is inside a group,
because ld actually loads the symbols from the recompiled object before running
over the contours of the script, with the result that no new undefs are seen
inside the group and thus looping over the group objects doesn't happen.

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