* [Bug lto/109369] LTO drops explicitly referenced symbol _pei386_runtime_relocator
2023-04-01 11:06 [Bug lto/109369] New: LTO drops explicitly referenced symbol _pei386_runtime_relocator pali at kernel dot org
@ 2023-04-01 11:52 ` pinskia at gcc dot gnu.org
2023-04-01 12:29 ` amonakov at gcc dot gnu.org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-04-01 11:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109369
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |lto
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This could be a binutils issue rather than a GCC lto issue too.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug lto/109369] LTO drops explicitly referenced symbol _pei386_runtime_relocator
2023-04-01 11:06 [Bug lto/109369] New: LTO drops explicitly referenced symbol _pei386_runtime_relocator pali at kernel dot org
2023-04-01 11:52 ` [Bug lto/109369] " pinskia at gcc dot gnu.org
@ 2023-04-01 12:29 ` amonakov at gcc dot gnu.org
2023-04-01 12:30 ` jakub at gcc dot gnu.org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: amonakov at gcc dot gnu.org @ 2023-04-01 12:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109369
Alexander Monakov <amonakov at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |amonakov at gcc dot gnu.org
--- Comment #2 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
GCC inlines _pei386_runtime_relocator and doesn't emit it because it doesn't
know that it's also referenced implicitly.
Does _pei386_runtime_relocator need to participate in LTO at all? If not, I'd
suggest moving it to a separate file that is compiled with -fno-lto.
If the linker can decide if it's needed only after seeing all post-LTO objects,
that might be the only solution.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug lto/109369] LTO drops explicitly referenced symbol _pei386_runtime_relocator
2023-04-01 11:06 [Bug lto/109369] New: LTO drops explicitly referenced symbol _pei386_runtime_relocator pali at kernel dot org
2023-04-01 11:52 ` [Bug lto/109369] " pinskia at gcc dot gnu.org
2023-04-01 12:29 ` amonakov at gcc dot gnu.org
@ 2023-04-01 12:30 ` jakub at gcc dot gnu.org
2023-04-01 12:34 ` pali at kernel dot org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-04-01 12:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109369
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
There is always __attribute__((used))
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug lto/109369] LTO drops explicitly referenced symbol _pei386_runtime_relocator
2023-04-01 11:06 [Bug lto/109369] New: LTO drops explicitly referenced symbol _pei386_runtime_relocator pali at kernel dot org
` (2 preceding siblings ...)
2023-04-01 12:30 ` jakub at gcc dot gnu.org
@ 2023-04-01 12:34 ` pali at kernel dot org
2023-04-01 12:42 ` amonakov at gcc dot gnu.org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pali at kernel dot org @ 2023-04-01 12:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109369
--- Comment #4 from Pali Rohár <pali at kernel dot org> ---
I wanted to point that marking _pei386_runtime_relocator() function with
__attribute__((used)) is working fine.
And whether _pei386_runtime_relocator() should participate in LTO at all? I
would rather ask, why not? Is there any specific reason why
_pei386_runtime_relocator() should not be compiled with LTO? I would expect
from gcc/ld that whole application can be compiled with LTO.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug lto/109369] LTO drops explicitly referenced symbol _pei386_runtime_relocator
2023-04-01 11:06 [Bug lto/109369] New: LTO drops explicitly referenced symbol _pei386_runtime_relocator pali at kernel dot org
` (3 preceding siblings ...)
2023-04-01 12:34 ` pali at kernel dot org
@ 2023-04-01 12:42 ` amonakov at gcc dot gnu.org
2023-04-11 11:57 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: amonakov at gcc dot gnu.org @ 2023-04-01 12:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109369
--- Comment #5 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
Indeed, sorry, __attribute__((used)) seems a much better solution for symbols
that might be referenced implicitly, in a manner that LTO plugin cannot see.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug lto/109369] LTO drops explicitly referenced symbol _pei386_runtime_relocator
2023-04-01 11:06 [Bug lto/109369] New: LTO drops explicitly referenced symbol _pei386_runtime_relocator pali at kernel dot org
` (4 preceding siblings ...)
2023-04-01 12:42 ` amonakov at gcc dot gnu.org
@ 2023-04-11 11:57 ` rguenth at gcc dot gnu.org
2023-04-11 12:49 ` amonakov at gcc dot gnu.org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-04-11 11:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109369
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Alexander Monakov from comment #5)
> Indeed, sorry, __attribute__((used)) seems a much better solution for
> symbols that might be referenced implicitly, in a manner that LTO plugin
> cannot see.
OTOH if the linker(?) introduces such use then it should properly communicate
this via the resolution info. That would hint at a binutils bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug lto/109369] LTO drops explicitly referenced symbol _pei386_runtime_relocator
2023-04-01 11:06 [Bug lto/109369] New: LTO drops explicitly referenced symbol _pei386_runtime_relocator pali at kernel dot org
` (5 preceding siblings ...)
2023-04-11 11:57 ` rguenth at gcc dot gnu.org
@ 2023-04-11 12:49 ` amonakov at gcc dot gnu.org
2023-04-11 18:20 ` pali at kernel dot org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: amonakov at gcc dot gnu.org @ 2023-04-11 12:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109369
--- Comment #7 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
Yes, ld should claim _pei386_runtime_relocator (even if later it becomes
unneeded due to zero relocations left to fix up) to make this work properly.
That's for Binutils to fix on their side.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug lto/109369] LTO drops explicitly referenced symbol _pei386_runtime_relocator
2023-04-01 11:06 [Bug lto/109369] New: LTO drops explicitly referenced symbol _pei386_runtime_relocator pali at kernel dot org
` (6 preceding siblings ...)
2023-04-11 12:49 ` amonakov at gcc dot gnu.org
@ 2023-04-11 18:20 ` pali at kernel dot org
2023-04-13 6:25 ` amonakov at gcc dot gnu.org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pali at kernel dot org @ 2023-04-11 18:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109369
--- Comment #8 from Pali Rohár <pali at kernel dot org> ---
So from the discussion, do I understand correctly that this is rather LD linker
issue?
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug lto/109369] LTO drops explicitly referenced symbol _pei386_runtime_relocator
2023-04-01 11:06 [Bug lto/109369] New: LTO drops explicitly referenced symbol _pei386_runtime_relocator pali at kernel dot org
` (7 preceding siblings ...)
2023-04-11 18:20 ` pali at kernel dot org
@ 2023-04-13 6:25 ` amonakov at gcc dot gnu.org
2023-04-13 7:13 ` pali at kernel dot org
2023-04-13 7:56 ` xry111 at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: amonakov at gcc dot gnu.org @ 2023-04-13 6:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109369
--- Comment #9 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
(In reply to Pali Rohár from comment #8)
> So from the discussion, do I understand correctly that this is rather LD
> linker issue?
Yes, ld changes will be needed to make this work automatically, without adding
the attribute manually. I would suggest to move the bug to the Binutils
Bugzilla.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug lto/109369] LTO drops explicitly referenced symbol _pei386_runtime_relocator
2023-04-01 11:06 [Bug lto/109369] New: LTO drops explicitly referenced symbol _pei386_runtime_relocator pali at kernel dot org
` (8 preceding siblings ...)
2023-04-13 6:25 ` amonakov at gcc dot gnu.org
@ 2023-04-13 7:13 ` pali at kernel dot org
2023-04-13 7:56 ` xry111 at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: pali at kernel dot org @ 2023-04-13 7:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109369
--- Comment #10 from Pali Rohár <pali at kernel dot org> ---
> I would suggest to move the bug to the Binutils Bugzilla.
Done: https://sourceware.org/bugzilla/show_bug.cgi?id=30343
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug lto/109369] LTO drops explicitly referenced symbol _pei386_runtime_relocator
2023-04-01 11:06 [Bug lto/109369] New: LTO drops explicitly referenced symbol _pei386_runtime_relocator pali at kernel dot org
` (9 preceding siblings ...)
2023-04-13 7:13 ` pali at kernel dot org
@ 2023-04-13 7:56 ` xry111 at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: xry111 at gcc dot gnu.org @ 2023-04-13 7:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109369
Xi Ruoyao <xry111 at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |xry111 at gcc dot gnu.org
Resolution|--- |MOVED
URL| |https://sourceware.org/bugz
| |illa/show_bug.cgi?id=30343
Status|UNCONFIRMED |RESOLVED
--- Comment #11 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
Moved.
^ permalink raw reply [flat|nested] 12+ messages in thread