49 lines · plain
1// RUN: llvm-mc -triple=thumbv7-none-linux-gnueabi -arm-add-build-attributes -filetype=obj -o %t.o %s2// RUN: llvm-jitlink -noexec -slab-address 0x76ff0000 -slab-allocate 10Kb -slab-page-size 4096 -abs printf=0x76bbe880 -show-entry-es %t.o | FileCheck %s3 4// Check that main is a thumb symbol (with LSB set) and printf is arm (with LSB clear)5//6// CHECK-LABEL: JITDylib "main"7// CHECK-NEXT: Link order: [ ("main", MatchAllSymbols), ("Process", MatchExportedSymbolsOnly) ]8// CHECK-NEXT: Symbol table:9// CHECK-NEXT: "main": 0x{{[0-9a-f]+[13579bdf]}} [Callable] Ready10// CHECK-NEXT: "printf": 0x76bbe880 [Data] Ready11 12 .globl main13 .p2align 214 .type main,%function15 .code 1616 .thumb_func17main:18 .fnstart19 .save {r7, lr}20 push {r7, lr}21 .setfp r7, sp22 mov r7, sp23 .pad #824 sub sp, #825 movs r0, #026 str r0, [sp]27 str r0, [sp, #4]28 ldr r0, .LCPI0_029.LPC0_0:30 add r0, pc31 bl printf32 ldr r0, [sp]33 add sp, #834 pop {r7, pc}35 36 .p2align 237.LCPI0_0:38 .long .L.str-(.LPC0_0+4)39 40 .size main, .-main41 .cantunwind42 .fnend43 44 .type .L.str,%object45 .section .rodata.str1.1,"aMS",%progbits,146.L.str:47 .asciz "Hello AArch32!\n"48 .size .L.str, 1249