https://bugs.llvm.org/show_bug.cgi?id=43552
Bug ID: 43552
Summary: ld -export-dynamic -r should probably ignore the
-export-dynamic
Product: lld
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: ELF
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
The dpdk build system gets its flags confused and passes -export-dynamic to "ld
-r".
It looks like bfd ignores -export-dynamic when used with -r, but lld doesn't.
The output produced by lld is relocatable, but has a .dynsym.
If that file is then passed to lld, it gets confused and produces a program
that crashes at startup.
$ cat test.s
.globl _start
_start:
mov $60, %rax
mov $0, %rdi
syscall
$ clang -c test.s
$ ld.lld -export-dynamic -r -o lld.o test.o
$ ld.lld -dynamic-linker /lib64/ld-linux-x86-64.so.2 /lib64/libgcc_s.so.1 lld.o
-o test.lld
$ ./test.lld
./run.sh: line 10: 106569 Segmentation fault (core dumped) ./test.lld
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs