[ELF] Make SyntheticSection parameter order match InputSection
[llvm-project.git] / lld / test / ELF / arm-exidx-dedup-and-sentinel.s
blob522c86daef73843a0402c5b2538b372074d2e930
1 // REQUIRES: arm
2 // RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t.o
3 // RUN: ld.lld %t.o -shared -o %t.so --section-start .text=0x2000 --section-start .ARM.exidx=0x1000
4 // RUN: llvm-objdump -s --triple=armv7a-none-linux-gnueabi %t.so | FileCheck %s
6 .syntax unified
8 .section .text.foo, "ax", %progbits
9 .globl foo
10 foo:
11 .fnstart
12 bx lr
13 .cantunwind
14 .fnend
16 .section .text.bar, "ax", %progbits
17 .globl bar
18 bar:
19 .fnstart
20 bx lr
21 .cantunwind
22 .fnend
24 // CHECK: Contents of section .ARM.exidx:
25 // 1000 + 1000 = 0x2000 = foo
26 // The entry for bar is the same as previous and is eliminated.
27 // The sentinel entry should be preserved.
28 // 1008 + 1000 = 0x2008 = bar + sizeof(bar)
29 // CHECK-NEXT: 1000 00100000 01000000 00100000 01000000