[lld] r259679 - ELF: Remove dead code.

Sean Silva via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 9 18:05:00 PST 2016


On Tue, Feb 9, 2016 at 4:31 PM, Rui Ueyama <ruiu at google.com> wrote:

> That's a violation of the ABI, no?
>

I'm not sure, but does it matter? Basically any object file produced by
clang>=3.4 with debug info will have this if the code uses thread-locals.
These files are out there in the wild and ToT clang still produces them.

-- Sean Silva


> On Mon, Feb 8, 2016 at 3:05 PM, Sean Silva <chisophugis at gmail.com> wrote:
>
>>
>>
>> On Wed, Feb 3, 2016 at 11:07 AM, Rui Ueyama via llvm-commits <
>> llvm-commits at lists.llvm.org> wrote:
>>
>>> Author: ruiu
>>> Date: Wed Feb  3 13:07:56 2016
>>> New Revision: 259679
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=259679&view=rev
>>> Log:
>>> ELF: Remove dead code.
>>>
>>> R_X86_64_DTPOFF64 relocs are for the dynamic linker.
>>> Static linkers create them but don't consume them.
>>>
>>
>> Clang produces these in debug info and now LLD dies on trivial inputs
>> like the object file produced with -g from `__thread long i;`. (full
>> example here: http://reviews.llvm.org/P1652)
>>
>> -- Sean Silva
>>
>>
>>>
>>> Modified:
>>>     lld/trunk/ELF/Target.cpp
>>>
>>> Modified: lld/trunk/ELF/Target.cpp
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.cpp?rev=259679&r1=259678&r2=259679&view=diff
>>>
>>> ==============================================================================
>>> --- lld/trunk/ELF/Target.cpp (original)
>>> +++ lld/trunk/ELF/Target.cpp Wed Feb  3 13:07:56 2016
>>> @@ -873,9 +873,6 @@ void X86_64TargetInfo::relocateOne(uint8
>>>    case R_X86_64_DTPOFF32:
>>>      write32le(Loc, SA);
>>>      break;
>>> -  case R_X86_64_DTPOFF64:
>>> -    write64le(Loc, SA);
>>> -    break;
>>>    case R_X86_64_GOTPCREL:
>>>    case R_X86_64_PC32:
>>>    case R_X86_64_PLT32:
>>>
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160209/01aeb189/attachment.html>


More information about the llvm-commits mailing list