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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ccoutant at gmail dot com,
                   |                            |iant at google dot com

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to luoxhu from comment #0)
> 
> cat hellow.res
> 3
> hello.o 2
> 192 ccb9165e03755470 PREVAILING_DEF main
> 197 ccb9165e03755470 PREVAILING_DEF_IRONLY s
> ./B/libhello.c.o 1
> 205 68e0b97e93a52d7a PREEMPTED_REG hello
> ./C/libhello.c.o 1
> 205 18fe2d3482bfb511 PREEMPTED_REG hello

This looks like a gold bug - we have 'hello' pre-empted twice but no prevailing
symbol in the IR - are you ending up with fat LTO objects?

OTOH PREEMPTED_REG seems then handled wrongly by LTO as well - it should
throw away both copies since the linker told us it found a preempting
definition in a non-IR object file.  So I'd expect a unresolved reference
to 'hello' rather than LTO complaining about multiple definitions ...

Note gold is really unmaintained, so you should probably avoid using it.

Reply via email to