<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 19, 2016 at 3:39 AM, Dave Bozier via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><span style="font-size:12.8px">Hi,</span></div><span class=""><span style="font-size:12.8px"><div><span style="font-size:12.8px"><br></span></div>> Scenario 1: you added -fuse-ld=lld to your command line, but you are suspecting that the option is ignored. Currently, it's actually surprisingly hard to tell if an output was created by LLD.</span><br><div><span style="font-size:12.8px"><br></span></div></span><div><span style="font-size:12.8px">Can't you use -v to see what linker the compiler driver invoked?</span></div></div></blockquote><div><br></div><div>Sometimes, things are buried very deep in a build system, such that extracting the clang invocation is difficult.</div><div><br></div><div>-- Sean Silva</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Wed, Oct 19, 2016 at 4:41 AM, Rui Ueyama via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On Tue, Oct 18, 2016 at 8:22 PM, Mehdi Amini <span dir="ltr"><<a href="mailto:mehdi.amini@apple.com" target="_blank">mehdi.amini@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><br>
> On Oct 18, 2016, at 6:44 PM, Rui Ueyama via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
><br>
> I'd like to make LLD embed version information so that we can determine if an executable was created by LLD and if that's the case which version of LLD.<br>
<br>
</span>Pardon my ignorance, but what’s the motivation?<br></blockquote><div><br></div></span><div>It should make trouble shooting linker issues easier. Here are a few scenarios.</div><div><br></div><div>Scenario 1: you added -fuse-ld=lld to your command line, but you are suspecting that the option is ignored. Currently, it's actually surprisingly hard to tell if an output was created by LLD.</div><div><br></div><div>Scenario 2: someone reported an issue about an executable linked by LLD, and we know that version X has a similar bug, then the first thing we want to do is to check if the executable was created with version X.</div><span><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
We don’t embed the clang version in every binary clang generates for instance.<br>
<span><br>
><br>
> ld.bfd doesn't seem to embed any information, so we cannot tell whether an executable was linked by ld.bfd or not easily.<br>
><br>
> ld.gold embeds a string "GNU gold <version>" as ".note.gnu.gold-version" section contents.<br>
><br>
> I'm wondering what we should do for LLD. The gold's way seems almost right, but I think we don't want to use the same section name because it contains "gold" as part of the section name. However, at the same time, I don't believe we want to create ".note.gnu.lld-version", because if we do, all programs that determine linker version need to look at ".note.gnu.<linker-name>-versi<wbr>on" for all known linkers. That's absurd. (Also, our product is not GNU, so ".gnu" part is probably irrelevant.)<br>
><br>
> I'm leaning towards ".note.linker-version" in hope that other linkers follow it.<br>
<br>
</span>At least that would look much better than a .gnu.xxxx<br>
<br>
—<br>
<span class="m_1596430310042401941m_3709038046398424669HOEnZb"><font color="#888888">Mehdi<br>
<br>
<br>
</font></span></blockquote></span></div><br></div></div>
<br></div></div><span class="">______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></span></blockquote></div><br></div>
<br>______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div></div>