llvm-project
24 строки · 811.0 Байт
1# REQUIRES: aarch64
2
3# RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %s -o %t.o
4# RUN: %lld -arch arm64 -dylib %t.o -o /dev/null
5
6## Check that we parse the LOH & match it to its referent sections correctly,
7## even when there are other subsections that don't get parsed as regular
8## sections. (We would previously segfault.)
9## __debug_info is one such section that gets special-case handling.
10
11.text
12_foo:
13
14.section __DWARF,__debug_info,regular,debug
15
16## __StaticInit occurs after __debug_info in the input object file, so the
17## LOH-matching code will have to "walk" past __debug_info while searching for
18## __StaticInit. Thus this verifies that we can skip past __debug_info
19## correctly.
20.section __TEXT,__StaticInit
21L1: adrp x1, _foo@PAGE
22L2: ldr x1, [x1, _foo@PAGEOFF]
23
24.loh AdrpLdr L1, L2
25