summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/ELF/Target.cpp1
-rw-r--r--lld/test/ELF/i386-relax-reloc.s7
2 files changed, 8 insertions, 0 deletions
diff --git a/lld/ELF/Target.cpp b/lld/ELF/Target.cpp
index 9dfc5d3f201..58f3beb751a 100644
--- a/lld/ELF/Target.cpp
+++ b/lld/ELF/Target.cpp
@@ -424,6 +424,7 @@ uint64_t X86TargetInfo::getImplicitAddend(const uint8_t *Buf,
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:
diff --git a/lld/test/ELF/i386-relax-reloc.s b/lld/test/ELF/i386-relax-reloc.s
index 244eb0c0417..a7fdc404cec 100644
--- a/lld/test/ELF/i386-relax-reloc.s
+++ b/lld/test/ELF/i386-relax-reloc.s
@@ -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@GOT(%ebx), %eax
+ movl bar+8@GOT(%ebx), %eax
+
+// CHECK: foo:
+// CHECK-NEXT: movl -4(%ebx), %eax
+// CHECK-NEXT: movl 4(%ebx), %eax
OpenPOWER on IntegriCloud