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

--- Comment #3 from Pali Rohár <pali at kernel dot org> ---
I have looked at the LD source code but I'm really not sure if I understood it
correclty. But for me it looks like that when LD generates runtime pseudo reloc
then it tries to reference _pei386_runtime_relocator symbol. All runtime pseudo
relocs are handled during runtime by the code statically linked into PE binary
called from the startup PE code. And this handling is implemened in mingw
function named _pei386_runtime_relocator(). So I guess that this referencing in
linker is trying to ensure that in final generated binary is code responsible
for handling of runtime pseudo relocs created by LD linker itself. And if this
my assumption is correct then this can be reason why compiling with LTO throws
that error because LTO compiler can inline that function into startup code and
explicit _pei386_runtime_relocator symbol is not used at all. But I'm really
not sure this is just my guessing. Cannot be issue in ld/pe-dll.c function
pe_create_runtime_relocator_reference() in the way how this symbol
_pei386_runtime_relocator is referenced there? Should not it be added to
"resolution info" (not sure what it is) like was described in the gcc bug?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to