This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/67111] New: ld -plugin segmentation fault
- From: "dilyan.palauzov at aegee dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 04 Aug 2015 08:33:29 +0000
- Subject: [Bug lto/67111] New: ld -plugin segmentation fault
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67111
Bug ID: 67111
Summary: ld -plugin segmentation fault
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: lto
Assignee: unassigned at gcc dot gnu.org
Reporter: dilyan.palauzov at aegee dot org
Target Milestone: ---
I have the newest gcc (g207b8288) and binutils (gedc66de).
binutils is configured with "/git/binutils-gdb/configure
--target=armv6kz-hardfloat-linux-gnueabi --with-sysroot=/raspberryOS/
--with-system-readline --enable-gold --with-system-zlib --with-mmap
--with-python=python3"
gcc is configured with "/git/gcc/configure --enable-host-shared
--enable-threads=posix --enable-languages=c,c++,jit,lto --enable-targets=all
--enable-nls --with-linker-hash-style=gnu --enable-interpreter
--enable-libgcj-multifile --with-system-zlib --with-mtune=arm1176jzf-s
--with-arch=armv6kz --target=armv6kz-hardfloat-linux-gnueabi --with-fpu=vfp
--with-float=hard --with-sysroot=/raspberryOS/"
I compile this programm c.c
int main () {
return 0;
}
with
$ ulimit -c unlimited
$ armv6kz-hardfloat-linux-gnueabi-gcc -pipe -O3 -flto -fno-fat-lto-objects
-Wl,-O1,-z,relro,-s -flto=4
-Wl,-plugin,/usr/local/libexec/gcc/armv6kz-hardfloat-linux-gnueabi/6.0.0/liblto_plugin.so
c.c
collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core
dumped
compilation terminated.
$ gdb armv6kz-hardfloat-linux-gnueabi-ld core
warning: core file may not match specified executable file.
[New LWP 19330]
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
Core was generated by
`/usr/local/lib/gcc/armv6kz-hardfloat-linux-gnueabi/6.0.0/../../../../armv6kz-ha'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 get_symbols (handle=<optimized out>, nsyms=<optimized out>, syms=<optimized
out>, def_ironly_exp=9) at /git/binutils-gdb/ld/plugin.c:667
667 if (syms[n].def != LDPK_UNDEF)
(gdb) bt f
#0 get_symbols (handle=<optimized out>, nsyms=<optimized out>, syms=<optimized
out>, def_ironly_exp=9) at /git/binutils-gdb/ld/plugin.c:667
blhe = <optimized out>
owner_sec = <optimized out>
res = <optimized out>
input = <optimized out>
abfd = 0x128adb0
n = <optimized out>
#1 0x00007fdad3f67448 in write_resolution () at
/git/gcc/lto-plugin/lto-plugin.c:476
info = 0x128cf50
symtab = 0x128cf60
syms = <optimized out>
i = 0
f = 0x14d5970
#2 all_symbols_read_handler () at /git/gcc/lto-plugin/lto-plugin.c:643
i = <optimized out>
num_lto_args = <optimized out>
lto_argv = 0x14d57c0
lto_arg_ptr = 0x14d57c0
__PRETTY_FUNCTION__ = "all_symbols_read_handler"
#3 0x000000000041fe02 in plugin_call_all_symbols_read () at
/git/binutils-gdb/ld/plugin.c:1210
rv = <optimized out>
curplug = 0x1249fd0
#4 0x00000000004155df in lang_process () at /git/binutils-gdb/ld/ldlang.c:6646
added = {
head = 0x1247210,
tail = 0x125ea00
}
files = {
head = 0x125ea00,
tail = 0x124a160
}
inputfiles = {
head = 0x1247210,
tail = 0x12d2d38
}
#5 0x00000000004036c7 in main (argc=43, argv=0x7ffc8b525068) at
/git/binutils-gdb/ld/ldmain.c:419
emulation = 0x7ffc8b525fbf "armelf_linux_eabi"
start_time = 0
start_sbrk = 0x1246000 ""