[lld] r274690 - Read the implicit addend of R_386_GOT32X.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 6 14:48:51 PDT 2016
Author: rafael
Date: Wed Jul 6 16:48:50 2016
New Revision: 274690
URL: http://llvm.org/viewvc/llvm-project?rev=274690&view=rev
Log:
Read the implicit addend of R_386_GOT32X.
Modified:
lld/trunk/ELF/Target.cpp
lld/trunk/test/ELF/i386-relax-reloc.s
Modified: lld/trunk/ELF/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.cpp?rev=274690&r1=274689&r2=274690&view=diff
==============================================================================
--- lld/trunk/ELF/Target.cpp (original)
+++ lld/trunk/ELF/Target.cpp Wed Jul 6 16:48:50 2016
@@ -424,6 +424,7 @@ uint64_t X86TargetInfo::getImplicitAdden
return 0;
case R_386_32:
case R_386_GOT32:
+ case R_386_GOT32X:
case R_386_GOTOFF:
case R_386_GOTPC:
case R_386_PC32:
Modified: lld/trunk/test/ELF/i386-relax-reloc.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/i386-relax-reloc.s?rev=274690&r1=274689&r2=274690&view=diff
==============================================================================
--- lld/trunk/test/ELF/i386-relax-reloc.s (original)
+++ lld/trunk/test/ELF/i386-relax-reloc.s Wed Jul 6 16:48:50 2016
@@ -1,5 +1,12 @@
// 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
+// RUN: llvm-objdump -d %t.so | FileCheck %s
+foo:
movl bar at GOT(%ebx), %eax
+ movl bar+8 at GOT(%ebx), %eax
+
+// CHECK: foo:
+// CHECK-NEXT: movl -4(%ebx), %eax
+// CHECK-NEXT: movl 4(%ebx), %eax
More information about the llvm-commits
mailing list