1## When spilling reorders input sections, the .ARM.exidx table is rebuilt using 2## the new order. 3 4# REQUIRES: arm 5# RUN: rm -rf %t && split-file %s %t && cd %t 6# RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi test.s -o test.o 7# RUN: ld.lld -T test.ld test.o -o test --enable-non-contiguous-regions 8# RUN: llvm-readobj -x .ARM.exidx test | FileCheck %s 9 10# CHECK: 20000000 08849780 1c000000 10849880 11# CHECK-NEXT: 1c000000 01000000 12 13#--- test.ld 14MEMORY { 15 exidx : ORIGIN = 0, LENGTH = 32 16 a : ORIGIN = 32, LENGTH = 4 17 b : ORIGIN = 36, LENGTH = 4 18 c : ORIGIN = 40, LENGTH = 4 19} 20 21SECTIONS { 22 .ARM.exidx : { *(.ARM.exidx) } >exidx 23 .first_chance : { *(.text .text.f2) } >a 24 .text.f1 : { *(.text.f1) } >b 25 .last_chance : { *(.text.f2) } >c 26} 27 28#--- test.s 29 .syntax unified 30 .section .text, "ax",%progbits 31 .globl _start 32_start: 33 .fnstart 34 bx lr 35 .save {r7, lr} 36 .setfp r7, sp, #0 37 .fnend 38 39 .section .text.f1, "ax", %progbits 40 .globl f1 41f1: 42 .fnstart 43 bx lr 44 .save {r8, lr} 45 .setfp r8, sp, #0 46 .fnend 47 48 .section .text.f2, "ax", %progbits 49 .globl f2 50f2: 51 .fnstart 52 bx lr 53 .save {r8, lr} 54 .setfp r8, sp, #0 55 .fnend 56