25 lines · plain
1# REQUIRES: aarch642 3# RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %s -o %t.o4# RUN: %lld -arch arm64 -dylib %t.o -o /dev/null5 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 regular8## sections. (We would previously segfault.)9## __debug_info is one such section that gets special-case handling.10 11.text12_foo:13 14.section __DWARF,__debug_info,regular,debug15 16## __StaticInit occurs after __debug_info in the input object file, so the17## LOH-matching code will have to "walk" past __debug_info while searching for18## __StaticInit. Thus this verifies that we can skip past __debug_info19## correctly.20.section __TEXT,__StaticInit21L1: adrp x1, _foo@PAGE22L2: ldr x1, [x1, _foo@PAGEOFF]23 24.loh AdrpLdr L1, L225