Read the implicit addend of R_386_GOT32X.

llvm-svn: 274690
This commit is contained in:
Rafael Espindola 2016-07-06 21:48:50 +00:00
parent 4b926a29fd
commit 9639ec1e66
2 changed files with 8 additions and 0 deletions

View File

@ -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:

View File

@ -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