1// REQUIRES: arm
2// RUN: llvm-mc -filetype=obj  -arm-add-build-attributes -triple=armv7a-none-linux-gnueabi %s -o %t.o
3// RUN: ld.lld %t.o -o %t.so -shared
4// RUN: llvm-readobj -S %t.so | FileCheck %s
5
6// Test that when all the .ARM.exidx sections are merged into a single
7// synthetic EXIDX_CANTUNWIND entry we can still set the SHF_LINK_ORDER
8// link.
9 .syntax unified
10 .section .text.1, "ax", %progbits
11 .globl f1
12 .type f1, %function
13f1:
14 bx lr
15
16 .section .text.2, "ax", %progbits
17 .globl f2
18 .type f2, %function
19f2:
20 .fnstart
21 bx lr
22 .cantunwind
23 .fnend
24
25// CHECK:      Name: .ARM.exidx
26// CHECK-NEXT: Type: SHT_ARM_EXIDX
27// CHECK-NEXT: Flags [
28// CHECK-NEXT:   SHF_ALLOC
29// CHECK-NEXT:   SHF_LINK_ORDER
30// CHECK-NEXT: ]
31// CHECK-NEXT: Address:
32// CHECK-NEXT: Offset:
33// CHECK-NEXT: Size:
34// CHECK-NEXT: Link: [[INDEX:.*]]
35
36// CHECK:      Index: [[INDEX]]
37// CHECK-NEXT: Name: .text
38