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-prefixes
=RELOC
,RELOC-NOAND
%s
< %t
5 @ RUN
: llvm-mc
%s
-triple
=armv7-unknown-linux-androideabi
-filetype
=obj
-o
- \
6 @ RUN
: | llvm-readobj
-S
--sd
--sr - | FileCheck
--check-prefix
=RELOC
%s
8 @ Check the compact pr0 model
39 @
-------------------------------------------------------------------------------
40 @ Check
.TEST1 section
41 @
-------------------------------------------------------------------------------
45 @ CHECK
: SectionData
(
46 @ CHECK
: 0000: 00482DE9
0DB0A0E1
0048BDE8
0EF0A0E1 |
.H-......H......|
51 @
-------------------------------------------------------------------------------
52 @ Check
.ARM.exidx.TEST1 section
53 @
-------------------------------------------------------------------------------
55 @ CHECK
: Name
: .ARM.exidx.TEST1
56 @
-------------------------------------------------------------------------------
57 @
0x80 = Compact model
0, personality routine
: __aeabi_unwind_cpp_pr0
58 @
0x9B = $sp can
be found in $
r11
59 @
0x8480 = pop
{r11, r14}
60 @
-------------------------------------------------------------------------------
61 @ CHECK
: SectionData
(
62 @ CHECK
: 0000: 00000000 80849B80 |
........|
65 @
-------------------------------------------------------------------------------
66 @ The first word should
be relocated to
.TEST1 section. Besides, on non-Android
67 @ there is another relocation entry for __aeabi_unwind_cpp_pr0
, so that the
68 @ linker will keep __aeabi_unwind_cpp_pr0.
69 @
-------------------------------------------------------------------------------
71 @ RELOC
: Name
: .rel.ARM.exidx.TEST1
72 @ RELOC
: Relocations
[
73 @ RELOC-NOAND-NEXT
: 0x0 R_ARM_NONE __aeabi_unwind_cpp_pr0
74 @ RELOC-NEXT
: 0x0 R_ARM_PREL31
.TEST1
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, on non-Android
102 @ there is another relocation entry for __aeabi_unwind_cpp_pr0
, so that the
103 @ linker will keep __aeabi_unwind_cpp_pr0.
104 @
-------------------------------------------------------------------------------
106 @ RELOC
: Name
: .rel.ARM.exidx.TEST2
107 @ RELOC
: Relocations
[
108 @ RELOC-NOAND-NEXT
: 0x0 R_ARM_NONE __aeabi_unwind_cpp_pr0
109 @ RELOC-NEXT
: 0x0 R_ARM_PREL31
.TEST2