https://bugs.llvm.org/show_bug.cgi?id=39104
Bug ID: 39104
Summary: LLD links incorrect ELF executable if version script
contains "local: *;"
Product: lld
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: ELF
Assignee: unassignedb...@nondot.org
Reporter: ori...@gmx.fr
CC: llvm-bugs@lists.llvm.org, raf...@espindo.la,
r...@google.com
Given these files:
x.c:
int main() { return 0; }
x.map:
{ local: *; };
an executable linked with:
clang x.c -o x -fuse-ld=lld -Wl,--version-script=x.map
does not run with an error:
./x: symbol lookup error: ./x: undefined symbol:
and "LD_DEBUG=symbols ./x" reveals that ld is looking for a symbol with
zero-length name.
(Such linker scripts are useful when an executable needs to dlopen a shared
object without exposing symbols that are supposed to be details of
implementation.)
This was introduced in https://reviews.llvm.org/D46103. LLD before r330966 and
other linkers produce an executable that runs with code 0, therefore this is a
regression in LLD 7.
--
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