[lld] r259679 - ELF: Remove dead code.

Sean Silva via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 8 15:05:11 PST 2016


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/20160208/71f50497/attachment.html>


More information about the llvm-commits mailing list