2016-04-18 20:31:37 +08:00
|
|
|
// REQUIRES: x86
|
|
|
|
// RUN: llvm-mc -filetype=obj -triple=i686-pc-linux %s -o %t.o
|
|
|
|
// RUN: ld.lld %t.o -o %t.so -shared
|
|
|
|
// RUN: llvm-readobj -s %t.so | FileCheck %s
|
|
|
|
// RUN: llvm-objdump -d %t.so | FileCheck --check-prefix=DISASM %s
|
|
|
|
|
|
|
|
movl $_GLOBAL_OFFSET_TABLE_, %eax
|
|
|
|
|
2016-11-02 05:26:28 +08:00
|
|
|
// CHECK: Name: .got
|
2016-04-18 20:31:37 +08:00
|
|
|
// CHECK-NEXT: Type: SHT_PROGBITS
|
|
|
|
// CHECK-NEXT: Flags [
|
|
|
|
// CHECK-NEXT: SHF_ALLOC
|
|
|
|
// CHECK-NEXT: SHF_WRITE
|
|
|
|
// CHECK-NEXT: ]
|
|
|
|
// CHECK-NEXT: Address: 0x2030
|
|
|
|
|
|
|
|
// DISASM: Disassembly of section .text:
|
|
|
|
// DISASM-NEXT: .text:
|
|
|
|
// DISASM-NEXT: 1000: {{.*}} movl $4144, %eax
|
|
|
|
// 0x2030 - 0x1000 = 4144
|