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

--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> ---
The BFD linker checks if a symbol in archive member is real definition, not
common,
before including the archive member in the link output so that a real
definition in
archive member can override the common symbol in .o files.  But the LTO plugin
includes the archive member even when the BFD linker simply just checks for the
real
definition.   We can change the BFD linker not to check for real definition in
LTO.
But it will make linker outputs different for LTO vs non-LTO inputs.  Can we
use
COMDAT instead common in LTO object file:

lib.o:
00000000 T fun
00000000 T fun2
00000000 C .gomp_critical_user_mysection

Reply via email to