FS#55741 - [binutils] ld segfault with -static and -Map
Attached to Project:
Arch Linux
Opened by Valère Monseur (valr) - Monday, 25 September 2017, 08:31 GMT
Last edited by Bartłomiej Piotrowski (Barthalion) - Monday, 09 October 2017, 08:41 GMT
Opened by Valère Monseur (valr) - Monday, 25 September 2017, 08:31 GMT
Last edited by Bartłomiej Piotrowski (Barthalion) - Monday, 09 October 2017, 08:41 GMT
|
Details
Description: ld segfault when compiling with both -static
and -Map options.
The reported error is: collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core dumped compilation terminated. Package version(s): binutils 2.29, and the problem occurs as well with binutils 2.29.1 (for info, gcc 7.2.0 & glibc 2.26) I've reported the bug upstream, this bug report is for info. https://sourceware.org/bugzilla/show_bug.cgi?id=22199 Steps to reproduce: 1) create source file: hello.c #include <stdio.h> int main (int argc, char **argv) { printf("hello world!"); } 2) compile with these options: gcc -Wl,-Map,hello.map hello.c => works ok gcc -static hello.c => works ok gcc -static -Wl,-Map,hello.map hello.c => segfault |
This task depends upon
Closed by Bartłomiej Piotrowski (Barthalion)
Monday, 09 October 2017, 08:41 GMT
Reason for closing: Fixed
Additional comments about closing: backported in 2.29.1-1
Monday, 09 October 2017, 08:41 GMT
Reason for closing: Fixed
Additional comments about closing: backported in 2.29.1-1
It's planned to be delivered in binutils 2.30 and has been backported to the 2.29 branch, so I guess it will be in a 2.29.2 version (when it will be released).
Btw, I forgot to mention that I originally reported the bug because busybox didn't compile anymore.
Should you need to statically compile busybox before the release of the new binutils version, you can apply this workaround (in the prepare function of the PKGBUILD):
sed -i 's/-Wl,-Map,$EXE.map//' scripts/trylink