[PATCH] D18960: [lld] Initial implementation of TLSDESC relocation handling

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 2 01:23:16 PDT 2016


>On 10 May 2016 at 07:57, Ed Maste <emaste at freebsd.org> wrote:

>> emaste added inline comments.
>>
>> ================
>> Comment at: ELF/OutputSections.h:297
>> @@ -287,2 +296,3 @@
>>    std::vector<DynamicReloc<ELFT>> Relocs;
>> +  std::vector<DynamicReloc<ELFT>> TlsDescRelocs;
>>  };
>> ----------------
>> rafael wrote:
>>> Why do you need the second vector? It seems you just relocate it at the same time as Relocs.
>> 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.
>
>Where is that documented?

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.
More info is in this comment: http://reviews.llvm.org/D16201#362725? and moving them at the end fixed it.
That is how how gold/bfd do btw, so it was not my idea to try and that just worked.
But I was unable to find the explanation for this.

>Cheers,
>Rafael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160602/9fab6027/attachment.html>


More information about the llvm-commits mailing list