<div dir="ltr">Why did you use personality function names instead of SymbolBody pointers to personality functions? In order to uniquify something by functions, pointer comparison is faster (and probably more straightforward in the LLD architecture) than string comparison.</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 8, 2016 at 1:20 PM, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">>> +    uint32_t ID = read32<E>(D.data() + 4);<br>
>> +    if (ID == 0) {<br>
>> +      // CIE<br>
>> +      Cie<ELFT> C(S, Index);<br>
>> +<br>
>> +      StringRef Personality;<br>
>> +      if (HasReloc) {<br>
>> +        uint32_t SymIndex = RelI->getSymbol(Config->Mips64EL);<br>
>> +        SymbolBody &Body =<br>
>> *S->getFile()->getSymbolBody(SymIndex)->repl();<br>
>> +        Personality = Body.getName();<br>
>> +      }<br>
>> +<br>
>> +      std::pair<StringRef, StringRef> CieInfo(Entry, Personality);<br>
><br>
><br>
> So, here, CIEs are uniquified by their contents and some symbol names. What<br>
> is the actual rule? I want to know what it is intended to do for what.<br>
><br>
<br>
</span>One symbol name: the personality function. The information about a<br>
frame is split into a fde and a cie. The cie contains information that<br>
can be shared by multiple fdes. We can unify cie by content, as long<br>
as we are careful to include which personality function that CIE uses.<br>
<br>
See <a href="https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/ehframechpt.html" rel="noreferrer" target="_blank">https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/ehframechpt.html</a><br>
for the format.<br>
<br>
Cheers,<br>
Rafael<br>
</blockquote></div><br></div>