<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 - Self assignment of code symbols fails in linker scripts"
href="https://bugs.llvm.org/show_bug.cgi?id=46834">46834</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Self assignment of code symbols fails in linker scripts
</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>Linux
</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>abidh.haq@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, smithp352@googlemail.com
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=23769" name="attach_23769" title="Tar file that includes a testcase (assembly file and linker script).">attachment 23769</a> <a href="attachment.cgi?id=23769&action=edit" title="Tar file that includes a testcase (assembly file and linker script).">[details]</a></span>
Tar file that includes a testcase (assembly file and linker script).
We have linker scripts which have expressions like below.
_init = DEFINED(user_init) ? user_init : _init;
which is like a self assignment. Such linker scripts work ok with GNU ld with
_init retaining its value. In lld, it gets zeroed out. I am attaching a simple
assembly file and a linker script which show this problem.</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>