brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 809278b Raw
58 lines · plain
1// REQUIRES: arm2// RUN: llvm-mc --arm-add-build-attributes --triple=armv7a-linux-gnueabihf -filetype=obj %s -o %t.o3// RUN: echo "SECTIONS { \4// RUN:         . = 0x80000000; \5// RUN:         .ARM.exidx : { *(.ARM.exidx) } \6// RUN:         .text : { *(.text) } \7// RUN:         .text.1 0x80000200 : AT(0x1000) { *(.text.1) } \8// RUN:         .text.2 0x80000100 : AT(0x2000) { *(.text.2) } \9// RUN: } " > %t.script10// RUN: ld.lld --script %t.script %t.o -o %t11// RUN: llvm-readobj -x .ARM.exidx %t | FileCheck %s12 13/// When a linker script does not have monotonically increasing addresses14/// the .ARM.exidx table should still be in monotonically increasing order.15 16// CHECK: Hex dump of section '.ARM.exidx':17// 0x80000000 + 0x28 = 0x80000028, 0x80000008 + 0xf8 = 0x80000100 18// CHECK-NEXT: 0x80000000 24000000 08849780 f8000000 2084998019// 0x80000010 + 0x1f0 = 0x8000200, 0x80000018 + 0x1ec = 0x800020420// CHECK-NEXT: 0x80000010 f0010000 10849880 ec010000 0100000021 22 .text23 .global _start24 .type _start, %function25_start:26 .fnstart27 bx lr28 .save {r7, lr}29 .setfp r7, sp, #030 .fnend31 32 .section .text.1, "ax", %progbits33 .global fn134 .type fn1, %function35fn1:36 .fnstart37 bx lr38 .save {r8, lr}39 .setfp r8, sp, #040 .fnend41 42 .section .text.2, "ax", %progbits43 .global fn244 .type fn2, %function45fn2:46 .fnstart47 bx lr48 .save {r9, lr}49 .setfp r9, sp, #050 .fnend51 52/// Dummy definition for a reference from the personality routine created by53/// the assembler, use .data to avoid generating a cantunwind table.54 .section .rodata55 .global __aeabi_unwind_cpp_pr056__aeabi_unwind_cpp_pr0:57 .word 058