1 ## Check that we dump the unwind information for a non-relocatable input properly.
3 ## Check that we correctly decode function addresses and that we are able to
4 ## locate corresponding STT_FUNC symbols and dump function names properly.
5 # RUN: yaml2obj %s -o %t
6 # RUN: llvm-readobj -u %t | FileCheck --check-prefix=UNWIND %s
7 # RUN: llvm-readelf -u %t | FileCheck --check-prefix=UNWIND %s
9 # UNWIND: UnwindInformation {
10 # UNWIND-NEXT: UnwindIndexTable {
11 # UNWIND-NEXT: SectionIndex: 2
12 # UNWIND-NEXT: SectionName: .ARM.exidx
13 # UNWIND-NEXT: SectionOffset: 0x34
14 # UNWIND-NEXT: Entries [
15 # UNWIND-NEXT: Entry {
16 # UNWIND-NEXT: FunctionAddress: 0x230
17 # UNWIND-NEXT: FunctionName: func1
18 # UNWIND-NEXT: Model: Compact (Inline)
19 # UNWIND-NEXT: PersonalityIndex: 0
20 # UNWIND-NEXT: Opcodes [
21 # UNWIND-NEXT: 0xB0 ; finish
22 # UNWIND-NEXT: 0xB0 ; finish
23 # UNWIND-NEXT: 0xB0 ; finish
26 # UNWIND-NEXT: Entry {
27 # UNWIND-NEXT: FunctionAddress: 0x234
28 # UNWIND-NEXT: FunctionName: func2
29 # UNWIND-NEXT: Model: Compact (Inline)
30 # UNWIND-NEXT: PersonalityIndex: 0
31 # UNWIND-NEXT: Opcodes [
32 # UNWIND-NEXT: 0x9B ; vsp = r11
33 # UNWIND-NEXT: 0x84 0x80 ; pop {fp, lr}
36 # UNWIND-NEXT: Entry {
37 # UNWIND-NEXT: FunctionAddress: 0x248
38 # UNWIND-NEXT: FunctionName: func3
39 # UNWIND-NEXT: Model: Compact (Inline)
40 # UNWIND-NEXT: PersonalityIndex: 0
41 # UNWIND-NEXT: Opcodes [
42 # UNWIND-NEXT: 0xB0 ; finish
43 # UNWIND-NEXT: 0xB0 ; finish
44 # UNWIND-NEXT: 0xB0 ; finish
47 # UNWIND-NEXT: Entry {
48 # UNWIND-NEXT: FunctionAddress: 0x24C
49 # UNWIND-NEXT: Model: CantUnwind
51 # UNWIND-NEXT: Entry {
52 # UNWIND-NEXT: FunctionAddress: 0x4000026B
53 # UNWIND-NEXT: FunctionName: func4
54 # UNWIND-NEXT: Model: Compact (Inline)
55 # UNWIND-NEXT: PersonalityIndex: 0
56 # UNWIND-NEXT: Opcodes [
57 # UNWIND-NEXT: 0xB0 ; finish
58 # UNWIND-NEXT: 0xB0 ; finish
59 # UNWIND-NEXT: 0xB0 ; finish
62 # UNWIND-NEXT: Entry {
63 # UNWIND-NEXT: FunctionAddress: 0x25C
64 # UNWIND-NEXT: FunctionName: func5
65 # UNWIND-NEXT: ExceptionHandlingTable: .ARM.extab
66 # UNWIND-NEXT: TableEntryAddress: 0xAABE44
67 # UNWIND-NEXT: Model: Generic
68 # UNWIND-NEXT: PersonalityRoutineAddress: 0x33CCCF44
69 # UNWIND-NEXT: PersonalityRoutineName: personality1
71 # UNWIND-NEXT: Entry {
72 # UNWIND-NEXT: FunctionAddress: 0x25C
73 # UNWIND-NEXT: FunctionName: func5
74 # UNWIND-NEXT: ExceptionHandlingTable: .ARM.extab
75 # UNWIND-NEXT: TableEntryAddress: 0xAABE48
76 # UNWIND-NEXT: Model: Generic
77 # UNWIND-NEXT: PersonalityRoutineAddress: 0xFFFFFFFFF811138C
97 ## A. Address of .ARM.exidx (0x24C) + entry offset (0) + 0x7fffffe4 (31 bit) == 0x230 (func1).
99 Value: 0x80B0B0B0 ## arbitrary opcodes.
100 ## B. Address of .ARM.exidx (0x24C) + entry offset (8) + 0x7fffffe0 (31 bit) == 0x234 (func2).
102 Value: 0x809B8480 ## arbitrary opcodes.
103 ## C. Address of .ARM.exidx (0x24C) + entry offset (16) + 0x7fffffec (31 bit) == 0x248 (func3).
105 Value: 0x80B0B0B0 ## arbitrary opcodes.
106 ## D. Address of .ARM.exidx (0x24C) + entry offset (24) + 0x7fffffe8 (31 bit) == 0x24C.
108 Value: EXIDX_CANTUNWIND
109 ## E. Address of .ARM.exidx (0x24C) + entry offset (32) + 0x3FFFFFFF (31 bit) == 0x4000026b (func4).
111 Value: 0x80B0B0B0 ## arbitrary opcodes.
112 ## F. Address of .ARM.exidx (0x24C) + entry offset (40) + 0x7FFFFFE8 (31 bit) == 0x25c (func5).
114 ## Generic model. .ARM.exidx (0x24C) + entry offset (40 + 4) + 0x00AABBCC ==
115 ## 0x00AABE44 == address of entry [0] in the .ARM.extab section.
116 ## 0x00AABE44 + 0x33221100 (31 bit, signed, .ARM.extab entry [0] value) ==
117 ## 0x33cccf44 == personality1 routine address.
119 ## G. Address of .ARM.exidx (0x24C) + entry offset (48) + 0x7FFFFFE0 (31 bit) == 0x25c (func5).
121 ## Generic model. .ARM.exidx (0x24C) + entry offset (48 + 4) + 0x00AABBC8 ==
122 ## 0x00AABE48 == address of entry [1] in the .ARM.extab section.
123 ## 0x00AABE48 + 0x77665544 (31 bit, signed, .ARM.extab entry [1] value) ==
124 ## 0xFFFFFFFFF811138C == the address of a personality routine function that does not exist.
129 Content: "0011223344556677"