[llvm-bugs] [Bug 42329] New: lld ignores symbols declared as EXTERN in linker script
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Jun 19 09:14:15 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=42329
Bug ID: 42329
Summary: lld ignores symbols declared as EXTERN in linker
script
Product: lld
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: ELF
Assignee: unassignedbugs at nondot.org
Reporter: ilie.halip at gmail.com
CC: llvm-bugs at lists.llvm.org, peter.smith at linaro.org
ld.lld has a different behavior compared to GNU ld when it comes to adding
undefined symbols from a linker script. Here's a simple test case:
$ touch a.c
$ clang -c a.c -o a.o
$ echo "EXTERN(test)" > a.lds
$ ld.lld -T a.lds a.o -o a.out
$ objdump -t a.out | grep test
$
The resulting file doesn't contain the "test" symbol, which was added through
the linker script. With GNU ld on the other hand:
$ ld -T a.lds a.o -o a.out
$ objdump -t a.out | grep test
0000000000000000 *UND* 0000000000000000 test
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190619/a784362a/attachment.html>
More information about the llvm-bugs
mailing list