<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 - -fwhole-program-vtables causes unused vtables to be kept (breaks --gc-sections)"
href="https://bugs.llvm.org/show_bug.cgi?id=48245">48245</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>-fwhole-program-vtables causes unused vtables to be kept (breaks --gc-sections)
</td>
</tr>
<tr>
<th>Product</th>
<td>lld
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</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>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>agrieve@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, smithp352@googlemail.com
</td>
</tr></table>
<p>
<div>
<pre>Not a confirmed theory, but it seems like the most plausible explanation for
what we're seeing.
When enabling -fwhole-program-vtables for Chrome on Android (arm32), the number
of relocations goes up instead of down.
I created a SuperSize report with --relocations, which produces a report of
just symbols that have relocations applied to them, and where their size is
replaced by the count of relocations that are applied to them.
Report:
<a href="https://chrome-supersize.firebaseapp.com/viewer.html?load_url=https%3A%2F%2Fstorage.googleapis.com%2Fchrome-supersize%2Foneoffs%2F1544ee488cda7704a1b001454fa81f09e66ac00d_5a6a344f9cb70dc3adf404ab99b1b4fce943b6ed.sizediff&byteunit=B&diff_mode=on">https://chrome-supersize.firebaseapp.com/viewer.html?load_url=https%3A%2F%2Fstorage.googleapis.com%2Fchrome-supersize%2Foneoffs%2F1544ee488cda7704a1b001454fa81f09e66ac00d_5a6a344f9cb70dc3adf404ab99b1b4fce943b6ed.sizediff&byteunit=B&diff_mode=on</a>
I chatted with <a href="mailto:pcc@google.com">pcc@google.com</a>, and we think the problem is that
-fwhole-program-vtables removes all section names in favor of a few
".L__unnamed_#" sections, and that's what's breaking --gc-sections's ability to
remove unused virtual classes.</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>