<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 - Support for .gnu.warning. section to generate linker warnings"
href="https://bugs.llvm.org/show_bug.cgi?id=42008">42008</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Support for .gnu.warning. section to generate linker warnings
</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>arichardson.kde@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, peter.smith@linaro.org
</td>
</tr></table>
<p>
<div>
<pre>I recently tried to use the .gnu.warning mechanism with LLD and noticed that it
is not supported.
If I try the example from
<a href="http://ninjalj.blogspot.com/2011/11/your-own-linker-warnings-using-gnu.html">http://ninjalj.blogspot.com/2011/11/your-own-linker-warnings-using-gnu.html</a>, I
only get output with ld.bfd.
$ $LLVM_BUILD/bin/clang -fuse-ld=$LLVM_BUILD/bin/ld.lld -o linkwarn linkwarn.o
linkwarnmain.o
(no output)
$ $LLVM_BUILD/bin/clang -fuse-ld=/usr/bin/ld.bfd -o linkwarn linkwarn.o
linkwarnmain.o
linkwarnmain.o: In function `main':
linkwarnmain.c:(.text+0x10): warning: foo is deprecated, please use the shiny
new foobar function
Looking for .gnu.warning in the source tree, I can only find references in
llvm-objcopy. Is this a feature that should be supported in LLD?</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>