Peter Smith | 113a59e | 2017-06-26 10:22:17 | [diff] [blame] | 1 | // RUN: llvm-mc -filetype=obj -triple=aarch64-linux-gnu %s -o %t |
George Rimar | d46753e | 2017-10-06 09:37:44 | [diff] [blame] | 2 | // RUN: ld.lld --hash-style=sysv -shared %t -o %t2 |
Peter Smith | 113a59e | 2017-06-26 10:22:17 | [diff] [blame] | 3 | // RUN: llvm-readobj -t %t2 | FileCheck %s |
| 4 | // REQUIRES: aarch64 |
| 5 | .globl a |
| 6 | .type a,@object |
| 7 | .comm a,4,4 |
| 8 | |
| 9 | .globl f |
| 10 | .type f,@function |
| 11 | f: |
| 12 | adrp x0, :got:a |
| 13 | ldr x0, [x0, #:got_lo12:a] |
| 14 | |
| 15 | .global _start |
| 16 | .type _start,@function |
| 17 | _start: |
| 18 | bl f |
| 19 | .data |
| 20 | .long _GLOBAL_OFFSET_TABLE_ - . |
| 21 | |
| 22 | // CHECK: Name: _GLOBAL_OFFSET_TABLE_ (11) |
Peter Smith | 3d044f5 | 2018-03-19 06:52:51 | [diff] [blame] | 23 | // CHECK-NEXT: Value: 0x20008 |
Peter Smith | 113a59e | 2017-06-26 10:22:17 | [diff] [blame] | 24 | // CHECK-NEXT: Size: 0 |
| 25 | // CHECK-NEXT: Binding: Local (0x0) |
| 26 | // CHECK-NEXT: Type: None (0x0) |
| 27 | // CHECK-NEXT: Other [ (0x2) |
| 28 | // CHECK-NEXT: STV_HIDDEN (0x2) |
| 29 | // CHECK-NEXT: ] |
Peter Smith | 3d044f5 | 2018-03-19 06:52:51 | [diff] [blame] | 30 | // CHECK-NEXT: Section: .got.plt |