1 @ RUN
: llvm-mc
%s
-triple
=armv7-unknown-linux-gnueabi
-filetype
=obj
-o
- \
2 @ RUN
: | llvm-readobj
-S
--sd
--sr > %t
3 @ RUN
: FileCheck
%s
< %t
4 @ RUN
: FileCheck
--check-prefix
=RELOC
%s
< %t
6 @ Check the compact pr0 model
37 @
-------------------------------------------------------------------------------
38 @ Check
.TEST1 section
39 @
-------------------------------------------------------------------------------
43 @ CHECK
: SectionData
(
44 @ CHECK
: 0000: 00482DE9
0DB0A0E1
0048BDE8
0EF0A0E1 |
.H-......H......|
49 @
-------------------------------------------------------------------------------
50 @ Check
.ARM.exidx.TEST1 section
51 @
-------------------------------------------------------------------------------
53 @ CHECK
: Name
: .ARM.exidx.TEST1
54 @
-------------------------------------------------------------------------------
55 @
0x80 = Compact model
0, personality routine
: __aeabi_unwind_cpp_pr0
56 @
0x9B = $sp can
be found in $
r11
57 @
0x8480 = pop
{r11, r14}
58 @
-------------------------------------------------------------------------------
59 @ CHECK
: SectionData
(
60 @ CHECK
: 0000: 00000000 80849B80 |
........|
63 @
-------------------------------------------------------------------------------
64 @ The first word should
be relocated to
.TEST1 section. Besides, there is
65 @ another relocation entry for __aeabi_unwind_cpp_pr0
, so that the linker
66 @ will keep __aeabi_unwind_cpp_pr0.
67 @
-------------------------------------------------------------------------------
69 @ RELOC
: Name
: .rel.ARM.exidx.TEST1
70 @ RELOC
: Relocations
[
71 @ RELOC
: 0x0 R_ARM_NONE __aeabi_unwind_cpp_pr0
0x0
72 @ RELOC
: 0x0 R_ARM_PREL31
.TEST1 0x0
77 @
-------------------------------------------------------------------------------
78 @ Check
.TEST2 section
79 @
-------------------------------------------------------------------------------
82 @ CHECK
: SectionData
(
83 @ CHECK
: 0000: 00482DE9
0088BDE8 |
.H-.....|
86 @
-------------------------------------------------------------------------------
87 @ Check
.ARM.exidx.TEST1 section
88 @
-------------------------------------------------------------------------------
90 @ CHECK
: Name
: .ARM.exidx.TEST2
91 @
-------------------------------------------------------------------------------
92 @
0x80 = Compact model
0, personality routine
: __aeabi_unwind_cpp_pr0
93 @
0x8480 = pop
{r11, r14}
95 @
-------------------------------------------------------------------------------
96 @ CHECK
: SectionData
(
97 @ CHECK
: 0000: 00000000 B0808480 |
........|
100 @
-------------------------------------------------------------------------------
101 @ The first word should
be relocated to
.TEST2 section. Besides, there is
102 @ another relocation entry for __aeabi_unwind_cpp_pr0
, so that the linker
103 @ will keep __aeabi_unwind_cpp_pr0.
104 @
-------------------------------------------------------------------------------
106 @ RELOC
: Name
: .rel.ARM.exidx.TEST2
107 @ RELOC
: Relocations
[
108 @ RELOC
: 0x0 R_ARM_NONE __aeabi_unwind_cpp_pr0
0x0
109 @ RELOC
: 0x0 R_ARM_PREL31
.TEST2 0x0