[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/22199] ld segfault with -static and -Map
From: |
valere.monseur at ymail dot com |
Subject: |
[Bug binutils/22199] ld segfault with -static and -Map |
Date: |
Mon, 25 Sep 2017 11:59:28 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=22199
--- Comment #3 from Valère Monseur <valere.monseur at ymail dot com> ---
I've added an attachment with the input files for the linker.
I can also reproduce the problem with these commands:
gcc -c hello.c
gcc -v -static -Wl,-v -Wl,-Map,hello.map hello.o -o hello => segfault
Here is the output:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib
--libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info
--with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --enable-libmpx --with-system-zlib --with-isl
--enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu
--disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object
--enable-linker-build-id --enable-lto --enable-plugin
--enable-install-libiberty --with-linker-hash-style=gnu
--enable-gnu-indirect-function --disable-multilib --disable-werror
--enable-checking=release --enable-default-pie --enable-default-ssp
Thread model: posix
gcc version 7.2.0 (GCC)
COMPILER_PATH=/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/:/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/:/usr/lib/gcc/x86_64-pc-linux-gnu/:/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/:/usr/lib/gcc/x86_64-pc-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/:/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-static' '-o' 'hello' '-mtune=generic'
'-march=x86-64'
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/collect2 -plugin
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/liblto_plugin.so
-plugin-opt=/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/lto-wrapper
-plugin-opt=-fresolution=/tmp/ccM7HJ0X.res -plugin-opt=-pass-through=-lgcc
-plugin-opt=-pass-through=-lgcc_eh -plugin-opt=-pass-through=-lc --build-id
--hash-style=gnu -m elf_x86_64 -static -o hello
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../lib/crt1.o
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../lib/crti.o
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/crtbeginT.o
-L/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0
-L/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../lib -L/lib/../lib
-L/usr/lib/../lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../.. -v -Map
hello.map hello.o --start-group -lgcc -lgcc_eh -lc --end-group
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/crtend.o
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../lib/crtn.o
collect2 version 7.2.0
/usr/bin/ld -plugin /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/liblto_plugin.so
-plugin-opt=/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/lto-wrapper
-plugin-opt=-fresolution=/tmp/ccM7HJ0X.res -plugin-opt=-pass-through=-lgcc
-plugin-opt=-pass-through=-lgcc_eh -plugin-opt=-pass-through=-lc --build-id
--hash-style=gnu -m elf_x86_64 -static -o hello
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../lib/crt1.o
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../lib/crti.o
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/crtbeginT.o
-L/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0
-L/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../lib -L/lib/../lib
-L/usr/lib/../lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../.. -v -Map
hello.map hello.o --start-group -lgcc -lgcc_eh -lc --end-group
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/crtend.o
/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../lib/crtn.o
collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core
dumped
compilation terminated.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/22199] New: ld segfault with -static and -Map, valere.monseur at ymail dot com, 2017/09/25
- [Bug binutils/22199] ld segfault with -static and -Map, hjl.tools at gmail dot com, 2017/09/25
- [Bug binutils/22199] ld segfault with -static and -Map, valere.monseur at ymail dot com, 2017/09/25
- [Bug binutils/22199] ld segfault with -static and -Map,
valere.monseur at ymail dot com <=
- [Bug binutils/22199] ld segfault with -static and -Map, hjl.tools at gmail dot com, 2017/09/25
- [Bug binutils/22199] ld segfault with -static and -Map, valere.monseur at ymail dot com, 2017/09/26
- [Bug binutils/22199] ld segfault with -static and -Map, cvs-commit at gcc dot gnu.org, 2017/09/26
- [Bug binutils/22199] ld segfault with -static and -Map, hjl.tools at gmail dot com, 2017/09/26
- [Bug binutils/22199] ld segfault with -static and -Map, cvs-commit at gcc dot gnu.org, 2017/09/26