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

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 2 06:29:57 PDT 2016


On 2 June 2016 at 01:23, George Rimar <grimar at accesssoftek.com> wrote:
>>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.


OK, we have to dig this down. The original aarch64 patches were quite
hard to follow and it took some time to refactor them so that it was
know what was incidental what was part of an undocumented abi.

I am first trying to get just .so that are liked directly with the
executable working so that I can split the patch.

Cheers,
Rafael


More information about the llvm-commits mailing list