[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/20103] New: Program received signal SIGSEGV, Segmentation fault
From: |
hjl.tools at gmail dot com |
Subject: |
[Bug ld/20103] New: Program received signal SIGSEGV, Segmentation fault |
Date: |
Mon, 16 May 2016 17:20:16 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=20103
Bug ID: 20103
Summary: Program received signal SIGSEGV, Segmentation fault
Product: binutils
Version: 2.27 (HEAD)
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: hjl.tools at gmail dot com
Target Milestone: ---
With clang 3.9.0 on x86-64, I got
address@hidden opt]$ cat dead.c
void dead()
{
}
address@hidden opt]$ cat live.c
extern void dead ();
void live()
{
dead ();
}
address@hidden opt]$ cat main.c
void live();
int
_start ()
{
live();
return 0;
}
address@hidden opt]$ make
/export/build/gnu/llvm-clang-bootstrap/stage3/build-x86_64-linux/bin/clang -c
-flto -o main.o main.c
/export/build/gnu/llvm-clang-bootstrap/stage3/build-x86_64-linux/bin/llvm-ar
scr main.a main.o
/export/build/gnu/llvm-clang-bootstrap/stage3/build-x86_64-linux/bin/clang -c
-flto -o dead.o dead.c
/export/build/gnu/llvm-clang-bootstrap/stage3/build-x86_64-linux/bin/llvm-ar
scr dead.a dead.o
/export/build/gnu/llvm-clang-bootstrap/stage3/build-x86_64-linux/bin/clang -c
-flto -o live.o live.c
/export/build/gnu/llvm-clang-bootstrap/stage3/build-x86_64-linux/bin/llvm-ar
scr live.a live.o
/export/build/gnu/llvm-clang-bootstrap/stage3/build-x86_64-linux/bin/clang -O0
-nostdlib -nostartfiles -fuse-ld=bfd -flto -static -o test main.a dead.a live.a
clang-3.9: error: unable to execute command: Segmentation fault
clang-3.9: error: linker command failed due to signal (use -v to see
invocation)
Makefile:29: recipe for target 'test' failed
make: *** [test] Error 254
rm live.o main.o dead.o
address@hidden opt]$
Program received signal SIGSEGV, Segmentation fault.
0x0000000000448d5a in bfd_set_gp_size (abfd=0x8987f0, i=8)
at /export/gnu/import/git/sources/binutils-gdb/bfd/bfd.c:1260
1260 elf_gp_size (abfd) = i;
Missing separate debuginfos, use: dnf debuginfo-install
libgcc-5.3.1-6.0.fc23.x86_64 libstdc++-5.3.1-6.0.fc23.x86_64
ncurses-libs-5.9-21.20150214.fc23.x86_64 zlib-1.2.8-9.fc23.x86_64
(gdb) bt
#0 0x0000000000448d5a in bfd_set_gp_size (abfd=0x8987f0, i=8)
at /export/gnu/import/git/sources/binutils-gdb/bfd/bfd.c:1260
#1 0x0000000000417a58 in ldlang_add_file (entry=0x863c20)
at /export/gnu/import/git/sources/binutils-gdb/ld/ldlang.c:6367
#2 0x000000000041d76c in add_archive_element (info=0x835c40 <link_info>,
abfd=0x8987f0, name=0x8965b0 "dead", subsbfd=0x7fffffffd7f8)
at /export/gnu/import/git/sources/binutils-gdb/ld/ldmain.c:811
#3 0x0000000000492379 in elf_link_add_archive_symbols (abfd=0x8943d0,
info=0x835c40 <link_info>)
at /export/gnu/import/git/sources/binutils-gdb/bfd/elflink.c:5279
#4 0x00000000004924d2 in bfd_elf_link_add_symbols (abfd=0x8943d0,
info=0x835c40 <link_info>)
at /export/gnu/import/git/sources/binutils-gdb/bfd/elflink.c:5335
#5 0x00000000004112d6 in load_symbols (entry=0x8372d0, place=0x7fffffffd920)
at /export/gnu/import/git/sources/binutils-gdb/ld/ldlang.c:2874
#6 0x0000000000411f9e in open_input_bfds (s=0x8372d0, mode=OPEN_BFD_RESCAN)
at /export/gnu/import/git/sources/binutils-gdb/ld/ldlang.c:3323
#7 0x0000000000418596 in lang_process ()
at /export/gnu/import/git/sources/binutils-gdb/ld/ldlang.c:6880
#8 0x000000000041c90a in main (argc=24, argv=0x7fffffffdb68)
at /export/gnu/import/git/sources/binutils-gdb/ld/ldmain.c:415
(gdb)
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/20103] New: Program received signal SIGSEGV, Segmentation fault,
hjl.tools at gmail dot com <=