From b02c4f162335ed055964f603ba3aca18b0e5c5bf Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 6 Aug 2019 15:23:28 +0930 Subject: PR24873, gcc -flto objects result in --start-group .. --end-group failure to include --as-needed libraries 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, thus missing the fact that new undefs appeared in the group. PR 24873 * ldlang.c (plugin_undefs): New static var. (open_input_bfds ): Loop on plugin_undefs and hitting plugin_insert point. (lang_process ): Set plugin_undefs. --- ld/ChangeLog | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ld/ChangeLog') diff --git a/ld/ChangeLog b/ld/ChangeLog index 8015427..8f9d1f0 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,11 @@ +2019-08-06 Alan Modra + + PR 24873 + * ldlang.c (plugin_undefs): New static var. + (open_input_bfds ): Loop on + plugin_undefs and hitting plugin_insert point. + (lang_process ): Set plugin_undefs. + 2019-08-02 Alan Modra * testsuite/ld-powerpc/tlsie.s: Correct medium model ELF sequence. -- cgit v1.1