<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 - Add a warning to keep backward compatibility with GNU"
href="https://bugs.llvm.org/show_bug.cgi?id=36938">36938</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Add a warning to keep backward compatibility with GNU
</td>
</tr>
<tr>
<th>Product</th>
<td>lld
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</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>ruiu@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>lld's symbol resolution semantics is different from traditional Unix linkers.
That's for a good reason, but that causes some practical issue when writing
code that should work on various targets. Once you migrate to lld, nothing
stops you from writing a Makefile (or equivalent) that works only with lld.
Since lld is not sensitive to the relative file order in the command line,
ld.lld foo.a bar.o
works even if bar.o depends on foo.a. But it fails with traditional linkers.
In order to catch that kind of error early, we may want to add a new command
line option to make lld to emit a warning when it finds backward references to
lazy symbols. I don't think that that option can catch all possible errors, but
it should still be useful.
Some background: once you completely migrate to lld, that kind of option is
useless. However, even if your company has completely migrated to lld, there is
a situation in which you still want to maintain compatibility with GNU linkers.
For example, if you open-source your internal code, you want to make it compile
and link with system default compiler and linker. Just like we can't force
users use clang++ instead of g++ to compile C++ source files, we can't really
say to users that they need lld instead of system's ld. Finding all
compatibility issues at once and fix all at once is hard, so we want to
identify and fix a compatibility issue as we create one. So, a feature for
making it easy to identify possible compatibility issue is useful.</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>