1 @ RUN
: llvm-mc
%s
-triple
=armv7-unknown-linux-gnueabi
-filetype
=obj
-o
- \
2 @ RUN
: | llvm-readobj
-S
--sd
--sr | FileCheck
%s
4 @ Check the compact pr1 model
14 .save {r4, r5, r11, lr}
15 push
{r4, r5, r11, lr}
24 @
-------------------------------------------------------------------------------
25 @ Check
.TEST1 section
26 @
-------------------------------------------------------------------------------
30 @ CHECK
: SectionData
(
31 @ CHECK
: 0000: 30482DE9
000081E0
08B08DE2
3088BDE8 |
0H-
.........0...|
36 @
-------------------------------------------------------------------------------
37 @ Check
.ARM.extab.TEST1 section
38 @
-------------------------------------------------------------------------------
40 @ CHECK
: Name
: .ARM.extab.TEST1
41 @
-------------------------------------------------------------------------------
42 @
0x81 = Compact model
1, personality routine
: __aeabi_unwind_cpp_pr1
43 @
0x9B = $sp can
be found in $
r11
44 @
0x41 = $sp
= $sp
- 8
45 @
0x8483 = pop
{r4, r5, r11, r14}
47 @
-------------------------------------------------------------------------------
48 @ CHECK
: SectionData
(
49 @ CHECK
: 0000: 419B0181 B0B08384
00000000 |
A...........|
54 @
-------------------------------------------------------------------------------
55 @ Check
.ARM.exidx.TEST1 section
56 @
-------------------------------------------------------------------------------
58 @ CHECK
: Name
: .ARM.exidx.TEST1
59 @ CHECK
: SectionData
(
60 @ CHECK
: 0000: 00000000 00000000 |
........|
64 @
-------------------------------------------------------------------------------
65 @ The first word should
be relocated to
.TEST1 section, and the second word
66 @ should
be relocated to
.ARM.extab.TEST1 section. Besides, there is
67 @ another relocation entry for __aeabi_unwind_cpp_pr1
, so that the linker
68 @ will keep __aeabi_unwind_cpp_pr1.
69 @
-------------------------------------------------------------------------------
70 @ CHECK
: Relocations
[
71 @ CHECK
: 0x0 R_ARM_NONE __aeabi_unwind_cpp_pr1
0x0
72 @ CHECK
: 0x0 R_ARM_PREL31
.TEST1 0x0
73 @ CHECK
: 0x4 R_ARM_PREL31
.ARM.extab.TEST1 0x0