xref: /llvm-project/lld/test/MachO/invalid/invalid-loh.s (revision 0e8d4980a8bc5eead1bcbbb37324ccb25a374cde)
1# REQUIRES: aarch64
2# RUN: rm -rf %t; mkdir -p %t
3
4# RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %s -o %t/test.o
5# RUN: not %lld -arch arm64 %t/test.o -o /dev/null 2>&1 | FileCheck %s
6
7# CHECK: error: {{.*}}test.o: linker optimization hint spans multiple sections
8
9.globl _main
10_main:
11L1:
12  adrp x0, _target@PAGE
13
14_foo:
15L2:
16  add x0, x0, _target@PAGEOFF
17
18_target:
19
20.loh AdrpAdd L1, L2
21.subsections_via_symbols
22