1// REQUIRES: arm 2// RUN: llvm-mc --arm-add-build-attributes --triple=armv7a-linux-gnueabihf -filetype=obj %s -o %t.o 3// 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.script 10// RUN: ld.lld --script %t.script %t.o -o %t 11// RUN: llvm-readobj -x .ARM.exidx %t | FileCheck %s 12 13/// When a linker script does not have monotonically increasing addresses 14/// 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 20849980 19// 0x80000010 + 0x1f0 = 0x8000200, 0x80000018 + 0x1ec = 0x8000204 20// CHECK-NEXT: 0x80000010 f0010000 10849880 ec010000 01000000 21 22 .text 23 .global _start 24 .type _start, %function 25_start: 26 .fnstart 27 bx lr 28 .save {r7, lr} 29 .setfp r7, sp, #0 30 .fnend 31 32 .section .text.1, "ax", %progbits 33 .global fn1 34 .type fn1, %function 35fn1: 36 .fnstart 37 bx lr 38 .save {r8, lr} 39 .setfp r8, sp, #0 40 .fnend 41 42 .section .text.2, "ax", %progbits 43 .global fn2 44 .type fn2, %function 45fn2: 46 .fnstart 47 bx lr 48 .save {r9, lr} 49 .setfp r9, sp, #0 50 .fnend 51 52/// Dummy definition for a reference from the personality routine created by 53/// the assembler, use .data to avoid generating a cantunwind table. 54 .section .rodata 55 .global __aeabi_unwind_cpp_pr0 56__aeabi_unwind_cpp_pr0: 57 .word 0 58