http://llvm.org/bugs/show_bug.cgi?id=21693
Bug ID: 21693
Summary: libLTO opportunistically links unused libraries
(libedit, libncurses, libffi)
Product: tools
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: lto
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
$ otool -L llvm-3.6/lib/libLTO.dylib
llvm-3.6/lib/libLTO.dylib:
/opt/local/libexec/llvm-3.6/lib/libLTO.dylib (compatibility version 0.0.0,
current version 0.0.0)
/opt/local/libexec/llvm-3.6/lib/libLLVM-3.6svn.dylib (compatibility version
0.0.0, current version 0.0.0)
/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version
1.2.8)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version
1213.0.0)
/opt/local/lib/libffi.6.dylib (compatibility version 7.0.0, current version
7.4.0)
/opt/local/lib/libedit.0.dylib (compatibility version 1.0.0, current
version 1.51.0)
/opt/local/lib/libncurses.5.dylib (compatibility version 5.0.0, current
version 5.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version
120.0.0)
but nm -m shows that only symbols from libLLVM, libSystem, and libc++ are used.
The other links are unnecessary.
Looking back at what I have on this system, this has been the case for quite
some time. The oldest libLTO that I have is from 3.3, and it pulls in zlib and
libffi (but libedit and ncurses cam in some time more recently).
$ otool -L llvm-3.3/lib/libLTO.dylib
llvm-3.3/lib/libLTO.dylib:
/opt/local/libexec/llvm-3.3/lib/libLTO.dylib (compatibility version 0.0.0,
current version 0.0.0)
/opt/local/libexec/llvm-3.3/lib/libLLVM-3.3.dylib (compatibility version
0.0.0, current version 0.0.0)
/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version
1.2.8)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version
1213.0.0)
/opt/local/lib/libffi.6.dylib (compatibility version 7.0.0, current version
7.2.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version
120.0.0)
These are built via MacPorts on OSX.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs