<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/69018>69018</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
support for `-z unique-symbol`
</td>
</tr>
<tr>
<th>Labels</th>
<td>
lld:ELF
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
nickdesaulniers
</td>
</tr>
</table>
<pre>
This was discussed briefly years ago in the context of potentially implementing "fine grain kernel address space layout randomization" for the Linux kernel, which has somewhat stalled.
https://github.com/ClangBuiltLinux/linux/issues/1184
It seems like [binutils 2.36 BFD implemented](https://lists.gnu.org/archive/html/info-gnu/2021-01/msg00015.html) implemented support for `-z unique_symbol` .
https://sourceware.org/binutils/docs/ld/Options.html documents this as:
> Avoid duplicated local symbol names in the symbol string table. Append ".number" to duplicated local symbol names if ‘unique-symbol’ is used. nounique-symbol is the default.
Since the work on FGKASLR has somewhat stalled, the priority of this feature in LLD is low/unclear, but filing a bug "upstream" to track this request for others to follow allong.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEVMGO2zYQ_Rr6MrBA0bZiHXTwZldFUQMFmt4LShxJrEekwiHXcb6-oOyku0CbXESIHL55fHyPmtmODrERhydxeN7oFCcfGmf7i0HWiZzFwJvOm1vz52QZrprBWO4TMxrogsWBbnBDHRj06ME6iBNC713ELxH8AIuP6KLVRDew80I45183glBqsA5hDNo6uGBwSKCNCcgMvOgegfTNpwhBO-Nn-1VH651QCgYf1jZn69KXx1ahPsJ1sv0Ek2ZgP-N10hE4aiI0hZDPQp7u3ynGhcXuJFQrVDvaOKWu6P0sVPuRtBufkqW4YgvV0mO0zAlZqLYsj_u3aL9GYMSZgewFQRyeOutStMSgil0FT-3zv-dGIw7PQh3fMyDLkYvRpcKHUahWh36yryhUO8WZcm83-O3oklCtkqrcylKoduZRSlkeintR_bYLcFoWH-KqlKjk9iskZz8n_Itvc-dJVBJ-IAn7FHq86oAPRt-OJFRrfJ8HMkK1vy_5RnhlAMb3KXdniNkpeoW7t9i9wOnVWwMmLWR7nRmS7zXBnQ44PSN_M89jjmPINom6IyzgtCzoTDZN4dLcYcg-iP5niAOIFyWOUtTHuwDbhwCP2RosQ2I0BTj_riIvZDYGB50ovlPrk3U9rqtXHy7gHbS__Hb6dP7jP72XnZlrl2B9sPGWU7FKNKCOKWA-9_n8nBuSvwrVJtcT6pD3dSnCYCkLoaFLa2rSwjGgnh8KxKD7yx0w4OeEfL91HycMnAsGT-SvoIm8G4uNaXam3tV6g01Z1R-UkvJYbaamVNIMRtXl_rhHXQ31MOiulFV32B_q2siNbZRUu1KWu_IoS7Ur9rpXeKjQfKjKUg5S7CXO2lJB9Dpn52zW0DRVLcvjhnSHxOtLoxSREbvTy7kVSuWHJzR5z7ZLI4u9vAfiO0q0kbD5P0tvv1t6kwI1Pwh3BnwM2yX4v7GPb4O90vwnAAD__2JAsVM">