xref: /aosp_15_r20/external/llvm/test/MC/MachO/AArch64/classrefs.s (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llvm-mc -triple arm64-apple-darwin10 %s -filetype=obj -o - | llvm-readobj -r --expand-relocs | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker; Test that we produce an external relocation with Lbar. We could also produce
4*9880d681SAndroid Build Coastguard Worker; an internal relocation. We just have to be careful to not use another symbol.
5*9880d681SAndroid Build Coastguard Worker
6*9880d681SAndroid Build Coastguard Worker// CHECK:      Relocations [
7*9880d681SAndroid Build Coastguard Worker// CHECK-NEXT:   Section __data {
8*9880d681SAndroid Build Coastguard Worker// CHECK-NEXT:     Relocation {
9*9880d681SAndroid Build Coastguard Worker// CHECK-NEXT:       Offset: 0x0
10*9880d681SAndroid Build Coastguard Worker// CHECK-NEXT:       PCRel: 0
11*9880d681SAndroid Build Coastguard Worker// CHECK-NEXT:       Length: 3
12*9880d681SAndroid Build Coastguard Worker// CHECK-NEXT:       Type: ARM64_RELOC_UNSIGNED (0)
13*9880d681SAndroid Build Coastguard Worker// CHECK-NEXT:       Symbol: Lbar
14*9880d681SAndroid Build Coastguard Worker// CHECK-NEXT:     }
15*9880d681SAndroid Build Coastguard Worker// CHECK-NEXT:   }
16*9880d681SAndroid Build Coastguard Worker// CHECK-NEXT: ]
17*9880d681SAndroid Build Coastguard Worker
18*9880d681SAndroid Build Coastguard Worker        .section        __DATA,__objc_classrefs,regular,no_dead_strip
19*9880d681SAndroid Build Coastguard WorkerLbar:
20*9880d681SAndroid Build Coastguard Worker
21*9880d681SAndroid Build Coastguard Worker        .section        __DATA,__data
22*9880d681SAndroid Build Coastguard Worker        .quad   Lbar
23*9880d681SAndroid Build Coastguard Worker
24