File: arm-exidx-relocatable.s

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (140 lines) | stat: -rw-r--r-- 3,865 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
// REQUIRES: arm
// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t
// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %S/Inputs/arm-exidx-cantunwind.s -o %tcantunwind
// Check that relocatable link maintains SHF_LINK_ORDER
// RUN: ld.lld -r %t %tcantunwind -o %t4
// RUN: llvm-readobj -S %t4 | FileCheck %s

// RUN: llvm-mc -filetype=obj -triple=armv7aeb-none-linux-gnueabi -mcpu=cortex-a8 %s -o %t
// RUN: llvm-mc -filetype=obj -triple=armv7aeb-none-linux-gnueabi -mcpu=cortex-a8 %S/Inputs/arm-exidx-cantunwind.s -o %tcantunwind
// Check that relocatable link maintains SHF_LINK_ORDER for big endian
// RUN: ld.lld -r %t %tcantunwind -o %t4
// RUN: llvm-readobj -S %t4 | FileCheck %s
// RUN: ld.lld --be8 -r %t %tcantunwind -o %t4
// RUN: llvm-readobj -S %t4 | FileCheck %s

// Each assembler created .ARM.exidx section has the SHF_LINK_ORDER flag set
// with the sh_link containing the section index of the executable section
// containing the function it describes. To maintain this property in
// relocatable links we pass through the .ARM.exidx section, the section it
// it has a sh_link to, and the associated relocation sections uncombined.

 .syntax unified
 .section .text, "ax",%progbits
 .globl _start
_start:
 .fnstart
 bx lr
 .cantunwind
 .fnend

 .section .text.f1, "ax", %progbits
 .globl f1
f1:
 .fnstart
 bx lr
 .cantunwind
 .fnend

 .section .text.f2, "ax", %progbits
 .globl f2
f2:
 .fnstart
 bx lr
 .cantunwind
 .fnend
 .globl f3
f3:
 .fnstart
 bx lr
 .cantunwind
 .fnend

// CHECK:         Index: 1
// CHECK-NEXT:    Name: .text

// CHECK:         Name: .ARM.exidx
// CHECK-NEXT:    Type: SHT_ARM_EXIDX (0x70000001)
// CHECK-NEXT:    Flags [ (0x82)
// CHECK-NEXT:      SHF_ALLOC (0x2)
// CHECK-NEXT:      SHF_LINK_ORDER (0x80)
// CHECK-NEXT:    ]
// CHECK-NEXT:    Address
// CHECK-NEXT:    Offset:
// CHECK-NEXT:    Size: 24
// CHECK-NEXT:    Link: 1


// CHECK:         Index: 4
// CHECK-NEXT:    Name: .text.f1

// CHECK:         Name: .ARM.exidx.text.f1
// CHECK-NEXT:    Type: SHT_ARM_EXIDX (0x70000001)
// CHECK-NEXT:    Flags [ (0x82)
// CHECK-NEXT:      SHF_ALLOC (0x2)
// CHECK-NEXT:      SHF_LINK_ORDER (0x80)
// CHECK-NEXT:    ]
// CHECK-NEXT:    Address
// CHECK-NEXT:    Offset:
// CHECK-NEXT:    Size: 8
// CHECK-NEXT:    Link: 4


// CHECK:         Index: 7
// CHECK-NEXT:    Name: .text.f2

// CHECK:         Name: .ARM.exidx.text.f2
// CHECK-NEXT:    Type: SHT_ARM_EXIDX (0x70000001)
// CHECK-NEXT:    Flags [ (0x82)
// CHECK-NEXT:      SHF_ALLOC (0x2)
// CHECK-NEXT:      SHF_LINK_ORDER (0x80)
// CHECK-NEXT:    ]
// CHECK-NEXT:    Address
// CHECK-NEXT:    Offset:
// CHECK-NEXT:    Size: 16
// CHECK-NEXT:    Link: 7


// CHECK:         Index: 10
// CHECK-NEXT:    Name: .func1

// CHECK:         Name: .ARM.exidx.func1
// CHECK-NEXT:    Type: SHT_ARM_EXIDX (0x70000001)
// CHECK-NEXT:    Flags [ (0x82)
// CHECK-NEXT:      SHF_ALLOC (0x2)
// CHECK-NEXT:      SHF_LINK_ORDER (0x80)
// CHECK-NEXT:    ]
// CHECK-NEXT:    Address
// CHECK-NEXT:    Offset:
// CHECK-NEXT:    Size: 8
// CHECK-NEXT:    Link: 10


// CHECK:         Index: 13
// CHECK-NEXT:    Name: .func2

// CHECK:         Name: .ARM.exidx.func2
// CHECK-NEXT:    Type: SHT_ARM_EXIDX (0x70000001)
// CHECK-NEXT:    Flags [ (0x82)
// CHECK-NEXT:      SHF_ALLOC (0x2)
// CHECK-NEXT:      SHF_LINK_ORDER (0x80)
// CHECK-NEXT:    ]
// CHECK-NEXT:    Address
// CHECK-NEXT:    Offset:
// CHECK-NEXT:    Size: 8
// CHECK-NEXT:    Link: 13


// CHECK:         Index: 16
// CHECK-NEXT:    Name: .func3

// CHECK:         Name: .ARM.exidx.func3
// CHECK-NEXT:    Type: SHT_ARM_EXIDX (0x70000001)
// CHECK-NEXT:    Flags [ (0x82)
// CHECK-NEXT:      SHF_ALLOC (0x2)
// CHECK-NEXT:      SHF_LINK_ORDER (0x80)
// CHECK-NEXT:    ]
// CHECK-NEXT:    Address
// CHECK-NEXT:    Offset:
// CHECK-NEXT:    Size: 8
// CHECK-NEXT:    Link: 16