[lld] r274687 - Recognize R_386_GOT32X.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 6 15:10:56 PDT 2016


I'm wondering if this is enough to link an object file that contains
R_386_GOT32X relocations.

On Wed, Jul 6, 2016 at 2:41 PM, Rafael Espindola via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: rafael
> Date: Wed Jul  6 16:41:39 2016
> New Revision: 274687
>
> URL: http://llvm.org/viewvc/llvm-project?rev=274687&view=rev
> Log:
> Recognize R_386_GOT32X.
>
> We don't relax it, but we at least recognize it.
>
> Added:
>     lld/trunk/test/ELF/i386-relax-reloc.s
> 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=274687&r1=274686&r2=274687&view=diff
>
> ==============================================================================
> --- lld/trunk/ELF/Target.cpp (original)
> +++ lld/trunk/ELF/Target.cpp Wed Jul  6 16:41:39 2016
> @@ -321,6 +321,7 @@ RelExpr X86TargetInfo::getRelExpr(uint32
>    case R_386_TLS_IE:
>      return R_GOT;
>    case R_386_GOT32:
> +  case R_386_GOT32X:
>    case R_386_TLS_GOTIE:
>      return R_GOT_FROM_END;
>    case R_386_GOTOFF:
>
> Added: lld/trunk/test/ELF/i386-relax-reloc.s
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/i386-relax-reloc.s?rev=274687&view=auto
>
> ==============================================================================
> --- lld/trunk/test/ELF/i386-relax-reloc.s (added)
> +++ lld/trunk/test/ELF/i386-relax-reloc.s Wed Jul  6 16:41:39 2016
> @@ -0,0 +1,5 @@
> +// REQUIRES: x86
> +// RUN: llvm-mc -filetype=obj -triple=i686-pc-linux %s -o %t.o
> -relax-relocations
> +// RUN: ld.lld -shared %t.o -o %t.so
> +
> +        movl bar at GOT(%ebx), %eax
>
>
> _______________________________________________
> 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/20160706/cb8cdfd9/attachment.html>


More information about the llvm-commits mailing list