1// REQUIRES: x86 2// RUN: llvm-mc -filetype=obj -triple=i386-pc-linux %s -o %t 3// RUN: ld.lld --hash-style=sysv -shared %t -o %t2 4// RUN: llvm-readobj --symbols %t2 | FileCheck %s 5 6// The X86 _GLOBAL_OFFSET_TABLE_ is defined at the start of the .got.plt 7// section. 8.globl a 9.type a,@object 10.comm a,4,4 11 12.globl f 13.type f,@function 14f: 15addl $_GLOBAL_OFFSET_TABLE_, %eax 16movl a@GOT(%eax), %eax 17 18.global _start 19.type _start,@function 20_start: 21addl $_GLOBAL_OFFSET_TABLE_, %eax 22calll f@PLT 23 24// CHECK: Name: _GLOBAL_OFFSET_TABLE_ (1) 25// CHECK-NEXT: Value: 0x325C 26// CHECK-NEXT: Size: 0 27// CHECK-NEXT: Binding: Local (0x0) 28// CHECK-NEXT: Type: None (0x0) 29// CHECK-NEXT: Other [ (0x2) 30// CHECK-NEXT: STV_HIDDEN (0x2) 31// CHECK-NEXT: ] 32// CHECK-NEXT: Section: .got.plt 33