aboutsummaryrefslogtreecommitdiff
path: root/test/ELF/i386-gotpc.s
blob: 14c2fcbec06446b01d159443b63728438574480b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// 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

// CHECK:      Name: .got (38)
// 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