<div dir="ltr">Let me roll it back for now. With this patch, we cannot link Clang with LLD anymore.</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 14, 2016 at 11:30 AM, Simon Atanasyan 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 Thu, Jan 14, 2016 at 8:14 PM, George Rimar <<a href="mailto:grimar@accesssoftek.com">grimar@accesssoftek.com</a>> wrote:<br>
>><br>
>>crtend.o file has .eh_frame section four byte length filled by zero.<br>
>>If i do not make a mistake after this commit LLD crashes on this<br>
>>section with "corrupted or unsupported CIE information" error.<br>
>>...<br>
>><br>
>>--<br>
>>Simon Atanasyan<br>
><br>
> Hello, Simon,<br>
> thanks for info !<br>
><br>
> The case you're pointing really looks like a special case which we should support.<br>
> I`ll take a look closer on it tomorrow if you dont mind.<br>
><br>
> As far as I know both bfd and gold just drop the creation of eh_frame_hdr if are not able to parse something in eh_frame.<br>
> We did it in another way. We assume that inputs should be correct and just exit with error.<br>
> I wonder if this is the only such exception we can meet in real life ? Currently lld will error exit on all corrupted/unsupported eh_frames if --eh-frame-hdr is specified.<br>
<br>
</span>I think this case is a standard. FDE has multiple 'required' fields<br>
but the first field "Length" has the following description:<br>
[[<br>
A 4 byte unsigned value indicating the length in bytes of the CIE<br>
structure, not including the Length field itself... If Length contains<br>
the value 0, then this CIE shall be considered a terminator and<br>
processing shall end.<br>
]]<br>
<a href="https://refspecs.linuxfoundation.org/LSB_3.0.0/LSB-PDA/LSB-PDA/ehframechpt.html" rel="noreferrer" target="_blank">https://refspecs.linuxfoundation.org/LSB_3.0.0/LSB-PDA/LSB-PDA/ehframechpt.html</a><br>
<br>
Here is one more reference link. Look at the line 656.<br>
<a href="https://github.com/gcc-mirror/gcc/blob/master/libgcc/crtstuff.c#L656" rel="noreferrer" target="_blank">https://github.com/gcc-mirror/gcc/blob/master/libgcc/crtstuff.c#L656</a><br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Simon Atanasyan<br>
</font></span><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>