https://bugs.llvm.org/show_bug.cgi?id=39587
Bug ID: 39587
Summary: lld elf/-bstatic creates crashing executable
Product: lld
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: ELF
Assignee: unassignedb...@nondot.org
Reporter: c...@remobjects.com
CC: llvm-bugs@lists.llvm.org, peter.sm...@linaro.org
Trying to use lld to create a -Bstatic executable for linux raspberrypi (armv7)
creates an invalid executable that crashes at run & fails to open in gdb.
The commandline was
lld -flavor gnu "ConsoleApplication907.a" "ConsoleApplication907.o" "Island.a"
"libgc.a" libgcc.a libgcc_eh.a libpthread.a librt.a libc.a --eh-frame-hdr
-Bstatic -o ConsoleApplication907
If I compile Island.a from bitcode to obj and use gnu ld it does work and run:
ld -\( Island.a "libgc.a" libgcc.a libgcc_eh.a libpthread.a librt.a libc.a
-\) ConsoleApplication907.o ConsoleApplication907.a Island.a --eh-frame-hdr
-Bstatic -o ConsoleApplication907
Neither linux nor anything else gives an indication of what is wrong, but ld
has no problem statically linking libc. The qemu linux emulator seems to jump
(blx) to _dl_hwcap which is a BSS symbol.
LLD repro file: https://1drv.ms/u/s!Au2nm7P_hgmawnGfF6vCLE7JGT21 (too big to
attach)
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs