<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; } .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left-width: 2px; border-left-style: solid; border-left-color: rgb(128, 0, 0); }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p><span style="font-size: 10pt; color: rgb(33, 33, 33);">>On 10 May 2016 at 07:57, Ed Maste <emaste@freebsd.org> wrote:</span><br>
</p>
<div style="color: rgb(33, 33, 33);"><font size="2"><span style="font-size:10pt;">
<div class="PlainText">>> emaste added inline comments.<br>
>><br>
>> ================<br>
>> Comment at: ELF/OutputSections.h:297<br>
>> @@ -287,2 +296,3 @@<br>
>>    std::vector<DynamicReloc<ELFT>> Relocs;<br>
>> +  std::vector<DynamicReloc<ELFT>> TlsDescRelocs;<br>
>>  };<br>
>> ----------------<br>
>> rafael wrote:<br>
>>> Why do you need the second vector? It seems you just relocate it at the same time as Relocs.<br>
>> The TLSDESC relocs have to follow the others; earlier versions of the patch kept track of the number of different types and inserted at the appropriate >point in the vector (and a middle version had a vector of reloc vectors), but this way seems more clear
 to me.<br>
><br>
>Where is that documented?<br>
<br>
afaik it is not documented, but I remember that when I did the patches for aarch and did not follow that rule - I had segfaults.</div>
<div class="PlainText">More info is in this comment: <a href="http://reviews.llvm.org/D16201#362725">http://reviews.llvm.org/D16201#362725</a>​ and moving them at the end fixed it.</div>
<div class="PlainText">That is how how gold/bfd do btw, so it was not my idea to try and that just worked.<br>
But I was unable to find the explanation for this.<br>
<br>
>Cheers,<br>
>Rafael<br>
</div>
</span></font></div>
</body>
</html>