1// REQUIRES: aarch64
2// RUN: llvm-mc -filetype=obj -triple=aarch64-windows %s -o %t.obj
3// RUN: lld-link -entry:main -subsystem:console %t.obj -out:%t.exe
4// Don't check the output, just make sure it links fine and doesn't
5// error out due to a misaligned load.
6    .text
7    .globl main
8    .globl myfunc
9main:
10    adrp x8, __imp_myfunc
11    ldr  x0, [x8, :lo12:__imp_myfunc]
12    br   x0
13    ret
14myfunc:
15    ret
16
17    .section .rdata, "dr"
18    // Start the .rdata section with a 4 byte chunk, to expose the alignment
19    // of the next chunk in the section.
20mydata:
21    .byte 42
22    // The synthesized LocalImportChunk gets stored here in the .rdata
23    // section, but needs to get proper 8 byte alignment since it is a
24    // pointer, just like regular LookupChunks in the IAT.
25