1// REQUIRES: x86
2// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
3// RUN: ld.lld -shared %t -o %t2
4// RUN: llvm-readobj -S --symbols %t2 | FileCheck %s
5
6// The X86_64 _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:
15movq	a@GOTPCREL(%rip), %rax
16
17.global _start
18.type _start,@function
19_start:
20callq	f@PLT
21.data
22.long _GLOBAL_OFFSET_TABLE_ - .
23
24// CHECK:     Name: .got.plt
25// CHECK:     Address: [[ADDR:.*]]
26// CHECK:     Name: _GLOBAL_OFFSET_TABLE_
27// CHECK-NEXT:     Value: [[ADDR]]
28// CHECK-NEXT:     Size: 0
29// CHECK-NEXT:     Binding: Local
30// CHECK-NEXT:     Type: None (0x0)
31// CHECK-NEXT:     Other [
32// CHECK-NEXT:       STV_HIDDEN
33// CHECK-NEXT:     ]
34// CHECK-NEXT:     Section: .got.plt
35