|
1 | 1 | # REQUIRES: system-linux
|
2 | 2 |
|
3 |
| -## Check that BOLT correctly reads ORC unwind information used by Linux Kernel. |
| 3 | +## Check that BOLT correctly reads ORC unwind information used by Linux kernel. |
4 | 4 |
|
5 | 5 | # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o
|
6 | 6 | # RUN: %clang %cflags %t.o -o %t.exe
|
|
15 | 15 | # CHECK-NEXT: {sp: 16, bp: -16, info: 0x15}: foo
|
16 | 16 | # CHECK-NEXT: {sp: 16, bp: -16, info: 0x14}: foo
|
17 | 17 | # CHECK-NEXT: {sp: 8, bp: 0, info: 0x5}: foo
|
| 18 | +# CHECK-NEXT: {sp: 0, bp: 0, info: 0x0}: bar |
18 | 19 | # CHECK-NEXT: {sp: 0, bp: 0, info: 0x0}: bar
|
19 | 20 |
|
20 | 21 | .text
|
|
50 | 51 | bar:
|
51 | 52 | .cfi_startproc
|
52 | 53 | ret
|
53 |
| -# Same ORC info propagated from foo above. |
| 54 | +## Same ORC info propagated from foo above. |
54 | 55 | # CHECK: retq # ORC: {sp: 8, bp: 0, info: 0x5}
|
55 | 56 | .L4:
|
56 | 57 | .cfi_endproc
|
|
61 | 62 | .section .orc_unwind_ip,"a",@progbits
|
62 | 63 | .align 4
|
63 | 64 |
|
64 |
| -# ORC for _start |
| 65 | +## ORC for _start. |
65 | 66 | .section .orc_unwind
|
66 | 67 | .2byte 8
|
67 | 68 | .2byte 0
|
|
76 | 77 | .section .orc_unwind_ip
|
77 | 78 | .long foo - .
|
78 | 79 |
|
79 |
| -# ORC for foo |
| 80 | +## ORC for foo. |
80 | 81 | .section .orc_unwind
|
81 | 82 | .2byte 8
|
82 | 83 | .2byte 0
|
@@ -112,7 +113,22 @@ bar:
|
112 | 113 | .section .orc_unwind_ip
|
113 | 114 | .long .L4 - .
|
114 | 115 |
|
115 |
| -# Fake Linux Kernel sections |
| 116 | +## Duplicate terminator entries to test ORC reader. |
| 117 | + .section .orc_unwind |
| 118 | + .2byte 0 |
| 119 | + .2byte 0 |
| 120 | + .2byte 0 |
| 121 | + .section .orc_unwind_ip |
| 122 | + .long .L4 - . |
| 123 | + |
| 124 | + .section .orc_unwind |
| 125 | + .2byte 0 |
| 126 | + .2byte 0 |
| 127 | + .2byte 0 |
| 128 | + .section .orc_unwind_ip |
| 129 | + .long .L4 - . |
| 130 | + |
| 131 | +## Fake Linux Kernel sections. |
116 | 132 | .section __ksymtab,"a",@progbits
|
117 | 133 | .section __ksymtab_gpl,"a",@progbits
|
118 | 134 | .section .pci_fixup,"a",@progbits
|
0 commit comments