<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - dead_strip_dylibs does not eliminate dylibs referenced by code removed with dead_strip"
href="https://bugs.llvm.org/show_bug.cgi?id=43681">43681</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>dead_strip_dylibs does not eliminate dylibs referenced by code removed with dead_strip
</td>
</tr>
<tr>
<th>Product</th>
<td>lld
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Macintosh
</td>
</tr>
<tr>
<th>OS</th>
<td>MacOS X
</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>MachO
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>szinukhov@parallels.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>dead_strip_dylib does not produce expected effect when combined with
dead_strip, as dynamic libraries referenced by eliminated code are not removed.
Only dynamic libraries removed by dead_strip_dylibs are those which are not
referenced at all.
Example
#include <cups/cups.h>
void unused() {
cupsGetDefault();
}
int main(int argc, const char * argv[]) {
return 0;
}
Invoking
clang -o binary main.c -lcups -framework CoreFoundation -Wl,-dead_strip
-Wl,-dead_strip_dylibs
Will produce binary without code referencing cups but still with LC_LOAD_DYLIB
libcups.2.dylib in.
(Note that CoreFoundation reference was correctly stripped - no code is using
it)</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>