<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - libLTO opportunistically links unused libraries (libedit, libncurses, libffi)"
href="http://llvm.org/bugs/show_bug.cgi?id=21693">21693</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>libLTO opportunistically links unused libraries (libedit, libncurses, libffi)
</td>
</tr>
<tr>
<th>Product</th>
<td>tools
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>lto
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jeremyhu@apple.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>$ 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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>