[Bug 1266492] Re: ld:i386 crashes with -static -fPIE -pie
Steve Beattie
sbeattie at ubuntu.com
Tue Jan 28 18:49:50 UTC 2014
So it turns out that ld hanging on the backtrace is actually glibc bug
https://sourceware.org/bugzilla/show_bug.cgi?id=16159 getting tickled.
Setting the MALLOC_CHECK_ environment variable causes it not to hang, by
not trying to emit the back trace and deadlocking on reacquiring the
malloc lock:
$ MALLOC_CHECK_=2 gcc -o /tmp/conftest -fPIE -pie -static conftest.c
collect2: error: ld terminated with signal 6 [Aborted], core dumped
/usr/bin/ld: BFD (GNU Binutils for Ubuntu) 2.24 assertion fail ../../bfd/elflink.c:13053
/usr/bin/ld: BFD (GNU Binutils for Ubuntu) 2.24 assertion fail ../../bfd/elflink.c:13053
/usr/bin/ld: BFD (GNU Binutils for Ubuntu) 2.24 assertion fail ../../bfd/elflink.c:13053
/usr/bin/ld: BFD (GNU Binutils for Ubuntu) 2.24 assertion fail ../../bfd/elflink.c:13053
/usr/bin/ld: BFD (GNU Binutils for Ubuntu) 2.24 assertion fail ../../bfd/elflink.c:13053
** Also affects: eglibc (Ubuntu)
Importance: Undecided
Status: New
** Bug watch added: Sourceware.org Bugzilla #16159
http://sourceware.org/bugzilla/show_bug.cgi?id=16159
** Also affects: eglibc via
http://sourceware.org/bugzilla/show_bug.cgi?id=16159
Importance: Unknown
Status: Unknown
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to eglibc in Ubuntu.
https://bugs.launchpad.net/bugs/1266492
Title:
ld:i386 crashes with -static -fPIE -pie
Status in Embedded GLIBC:
Unknown
Status in “binutils” package in Ubuntu:
Confirmed
Status in “eglibc” package in Ubuntu:
New
Status in “evolution-data-server” package in Ubuntu:
Triaged
Status in “xorg-server” package in Ubuntu:
Triaged
Status in “binutils” source package in Trusty:
Confirmed
Status in “eglibc” source package in Trusty:
New
Status in “evolution-data-server” source package in Trusty:
Triaged
Status in “xorg-server” source package in Trusty:
Triaged
Bug description:
Making a simple file conftest.c with the following contents:
int main() { return 0; }
And then compiling it on i386 with gcc -fPIE -pie -static conftest.c
returns:
*** Error in `/usr/bin/ld': corrupted double-linked list: 0x08dddb38
***
This breaks compilation xorg-server on i386. I believe that -static
-fPIE -pie is probably invalid, and it fails on amd64 too.
$ gcc -fPIE -pie -static conftest.c
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.8/crtbeginT.o: relocation R_X86_64_32 against `__TMC_END__' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-linux-gnu/4.8/crtbeginT.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
But autoconf hangs on the corrupted double-linked list, which times
out the xorg-server build.
To manage notifications about this bug go to:
https://bugs.launchpad.net/eglibc/+bug/1266492/+subscriptions
More information about the foundations-bugs
mailing list