1 // RUN: llvm-mc < %s -triple=aarch64-none-linux-gnu -filetype=obj | llvm-readobj -r | FileCheck %s
2 // RUN: llvm-mc < %s -triple=arm64-none-linux-gnu -filetype=obj | llvm-readobj -r | FileCheck %s
7 .type test_jumptable,@function
8 test_jumptable: // @test_jumptable
16 add x0, x0, #:lo12:.LJTI0_0
17 ldr x0, [x0, x1, lsl #3]
35 .size test_jumptable, .Ltmp0-test_jumptable
37 .section .rodata,"a",@progbits
48 // First make sure we get a page/lo12 pair in .text to pick up the jump-table
50 // CHECK: Relocations [
51 // CHECK: Section ({{[0-9]+}}) .rela.text {
52 // CHECK-NEXT: 0x{{[0-9,A-F]+}} R_AARCH64_ADR_PREL_PG_HI21 .rodata
53 // CHECK-NEXT: 0x{{[0-9,A-F]+}} R_AARCH64_ADD_ABS_LO12_NC .rodata
56 // Also check the targets in .rodata are relocated
57 // CHECK: Section ({{[0-9]+}}) .rela.rodata {
58 // CHECK-NEXT: 0x{{[0-9,A-F]+}} R_AARCH64_ABS64 .text