<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 - --no-undefined-version fails with version aliases"
href="https://bugs.llvm.org/show_bug.cgi?id=34012">34012</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>--no-undefined-version fails with version aliases
</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>ELF
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>smeenai@fb.com
</td>
</tr>
<tr>
<th>CC</th>
<td>compnerd@compnerd.org, grimar@accesssoftek.com, llvm-bugs@lists.llvm.org, rafael.espindola@gmail.com, ruiu@google.com
</td>
</tr></table>
<p>
<div>
<pre># RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
# RUN: echo "V1 { global: f; local: *; };" > %t.script
# RUN: ld.lld -shared --version-script %t.script --no-undefined-version %t.o \
# RUN: -o %t.so
.global _f
_f:
retq
.symver _f, f@V1
The above fails with
error: version script assignment of 'V1' to symbol 'f' failed: symbol not
defined
We attempt to look up f in the symbol table. However, the symbol table actually
contains f@V1, so the lookup fails.
I'm not 100% sure my version script (marking a symbol as global when it already
has a .symver) is valid, but both bfd and gold are happy with it. Additionally,
bfd actually needs the global: f to export the symbol even with the .symver;
gold and lld export it without.</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>