blob: a230d658de81bbe43aee289abdd044090fd29479 [file] [log] [blame]
Rafael Espindolad03e6592016-07-06 21:41:391// REQUIRES: x86
2// RUN: llvm-mc -filetype=obj -triple=i686-pc-linux %s -o %t.o -relax-relocations
3// RUN: ld.lld -shared %t.o -o %t.so
Fangrui Song210949a2019-03-25 23:46:194// RUN: llvm-readelf -S %t.so | FileCheck --check-prefix=SEC %s
Fangrui Song9c371302019-08-20 08:43:475// RUN: llvm-objdump -d --no-show-raw-insn %t.so | FileCheck %s
Rafael Espindolad03e6592016-07-06 21:41:396
Fangrui Song9c371302019-08-20 08:43:477// SEC: .got PROGBITS 000021f0
8// SEC-NEXT: .got.plt PROGBITS 000031f4
Fangrui Song210949a2019-03-25 23:46:199
Fangrui Song210949a2019-03-25 23:46:1910// CHECK: foo:
Fangrui Song9c371302019-08-20 08:43:4711// CHECK-NEXT: 1194: movl -4100(%ebx), %eax
12// CHECK-NEXT: movl -4092(%ebx), %eax
Fangrui Song210949a2019-03-25 23:46:1913
Rafael Espindola9639ec12016-07-06 21:48:5014foo:
Rafael Espindolad03e6592016-07-06 21:41:3915 movl bar@GOT(%ebx), %eax
Rafael Espindola9639ec12016-07-06 21:48:5016 movl bar+8@GOT(%ebx), %eax