[llvm-bugs] [Bug 30330] New: -rpath-link stores absolute path in NEEDED when library has RPATH of "."
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Sep 8 11:37:00 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=30330
Bug ID: 30330
Summary: -rpath-link stores absolute path in NEEDED when
library has RPATH of "."
Product: lld
Version: unspecified
Hardware: PC
OS: FreeBSD
Status: NEW
Severity: normal
Priority: P
Component: ELF
Assignee: unassignedbugs at nondot.org
Reporter: eric at vangyzen.net
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
When using -rpath-link to link to a shared library that has an RPATH of ".",
lld stores the absolute path in the executable's NEEDED entry. By contrast,
ld.bfd stores just the file name, with no path.
Steps to reproduce:
touch foo.c
echo 'int main(){return 0;}' > bar.c
clang -shared -Wl,-rpath,. -o libfoo.so foo.c
clang -fuse-ld=bfd -Wl,-rpath-link,$PWD -L$PWD -lfoo -o bar bar.c
objdump -x bar | grep libfoo
NEEDED libfoo.so
clang -fuse-ld=lld -Wl,-rpath-link,$PWD -L$PWD -lfoo -o bar bar.c
objdump -x bar | grep libfoo
NEEDED /home/evangyzen/tmp/lld/libfoo.so
--
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/20160908/9ac3c73e/attachment.html>
More information about the llvm-bugs
mailing list