ld and R_386_GOTOFF relocs
Peter S. Mazinger
ps.m@gmx.net
Wed May 11 22:57:00 GMT 2005
Hello!
I have gotten under peculiar circumstances following:
(sysvinit) init.o: relocation R_386_GOTOFF against protected function
`main' can not be used when making a shared object
libc.so does not provide a weak 'main', main() is in crt1.o defined in asm
as '.protected main'.
init is built as -pie executable.
I think this check is valid if a shared lib is created, but not valid for
a PIE executable.
I think, that a check info->shared should be changed to
info->shared && !info->pie (or !info->executable), to allow pie to be
linked, but I can't locate the one needed for this.
Thanks, Peter
Please CC to me
--
Peter S. Mazinger <ps dot m at gmx dot net> ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08 BB6E C389 975E A5F0 59F2
More information about the Binutils
mailing list