summaryrefslogtreecommitdiffstats
path: root/lld/test/ELF/i386-relax-reloc.s
blob: a230d658de81bbe43aee289abdd044090fd29479 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// 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-readelf -S %t.so | FileCheck --check-prefix=SEC %s
// RUN: llvm-objdump -d --no-show-raw-insn %t.so | FileCheck %s

// SEC:      .got PROGBITS 000021f0
// SEC-NEXT: .got.plt PROGBITS 000031f4

// CHECK: foo:
// CHECK-NEXT: 1194: movl    -4100(%ebx), %eax
// CHECK-NEXT:       movl    -4092(%ebx), %eax

foo:
        movl bar@GOT(%ebx), %eax
        movl bar+8@GOT(%ebx), %eax
OpenPOWER on IntegriCloud