[ELF] Make section member orders consistent
[llvm-project.git] / lld / test / ELF / arm-static-defines.s
blobd367e952c898089492c03125ca373e5c58999846
1 // REQUIRES: arm
2 // RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t
3 // RUN: ld.lld --no-merge-exidx-entries %t --static -o %t2
4 // RUN: llvm-readobj --symbols %t2 | FileCheck %s
6 // Check that on ARM we don't get a multiply defined symbol for __tls_get_addr
7 // and undefined symbols for references to __exidx_start and __exidx_end
8 .syntax unified
9 .section .text
10 .global __tls_get_addr
11 __tls_get_addr:
12 bx lr
14 .global _start
15 .global __exidx_start
16 .global __exidx_end
17 _start:
18 .fnstart
19 bx lr
20 .word __exidx_start
21 .word __exidx_end
22 .cantunwind
23 .fnend
25 // CHECK: Name: __exidx_start
26 // CHECK-NEXT: Value: 0x100D4
27 // CHECK-NEXT: Size: 0
28 // CHECK-NEXT: Binding: Local
29 // CHECK-NEXT: Type: None
30 // CHECK-NEXT: Other [
31 // CHECK-NEXT: STV_HIDDEN
32 // CHECK-NEXT: ]
33 // CHECK: Name: __exidx_end
34 // CHECK-NEXT: Value: 0x100E4
35 // CHECK-NEXT: Size: 0
36 // CHECK-NEXT: Binding: Local
37 // CHECK-NEXT: Type: None
38 // CHECK-NEXT: Other [
39 // CHECK-NEXT: STV_HIDDEN
40 // CHECK-NEXT: ]
41 // CHECK-NEXT: Section: .ARM.exidx
42 // CHECK: Symbol {
43 // CHECK-NEXT: Name: __tls_get_addr