<div dir="ltr">Now that George committed a fix for the bug that we are producing the bogus file, so I think we want to revert this.</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 17, 2016 at 8:13 PM, Ed Maste via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@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"><span class="">On 17 March 2016 at 15:01, Sean Silva <<a href="mailto:chisophugis@gmail.com">chisophugis@gmail.com</a>> wrote:<br>
><br>
> In the spec it says:<br>
><br>
> <a href="http://www.sco.com/developers/gabi/latest/ch4.sheader.html" rel="noreferrer" target="_blank">http://www.sco.com/developers/gabi/latest/ch4.sheader.html</a><br>
</span>> sh_entsizeSome sections hold a table of fixed-size entries, such as a symbol<br>
<span class="">> table. For such a section, this member gives the size in bytes of each<br>
> entry. The member contains 0 if the section does not hold a table of<br>
> fixed-size entries.<br>
><br>
> Isn't `sh_entsize == 0` what would be set for a mergeable string table?<br>
<br>
</span>It seems not -- Ian Lance Taylor described sh_entsize for SHF_STRINGS<br>
in <a href="https://sourceware.org/ml/binutils/2012-11/msg00145.html" rel="noreferrer" target="_blank">https://sourceware.org/ml/binutils/2012-11/msg00145.html</a>:<br>
| sh_entsize tells the linker the size of a character in a string. This<br>
| permits the linker to correctly handle strings represented in, e.g.,<br>
| UTF-16 or UCS-2.<br>
<br>
So in practice we'd usually see sh_entsize=1 for SHF_STRINGS sections.<br>
<span class=""><br>
> Why haven't we run into this before?<br>
<br>
</span>In fact we have, it's just that having this cause an issue requires<br>
using lld -r to produce a relocatable object that has a SHF_MERGE<br>
section, and then feeding that back into lld as input. Until we had -r<br>
support there was no opportunity to observe it.<br>
<br>
Also it turns out the FreeBSD amd64 userland build doesn't use lld -r<br>
in this way. I only observed it when starting to try lld in the the<br>
FreeBSD/i386 build, which uses -r to create the C runtime objects like<br>
crt1.o.<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div>