Rename CODE_OWNERS -> Maintainers (#114544)
[llvm-project.git] / lld / test / COFF / arm64-localimport-align.s
blob4fbc79ec36d796711244ffefec1333d45d363a47
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
9 main:
10 adrp x8, __imp_myfunc
11 ldr x0, [x8, :lo12:__imp_myfunc]
12 br x0
13 ret
14 myfunc:
15 ret
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.
20 mydata:
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.