• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1@ RUN: llvm-mc %s -triple=armv7-unknown-linux-gnueabi -filetype=obj -o - \
2@ RUN:   | llvm-readobj -s -sd -sr | FileCheck %s
3
4@ Check the compact pr1 model
5
6	.syntax unified
7
8	.section .TEST1
9	.globl	func1
10	.align	2
11	.type	func1,%function
12func1:
13	.fnstart
14	.save	{r4, r5, r11, lr}
15	push	{r4, r5, r11, lr}
16	add	r0, r1, r0
17	.setfp	r11, sp, #8
18	add	r11, sp, #8
19	pop	{r4, r5, r11, pc}
20	.fnend
21
22
23
24@-------------------------------------------------------------------------------
25@ Check .TEST1 section
26@-------------------------------------------------------------------------------
27@ CHECK: Sections [
28@ CHECK:   Section {
29@ CHECK:     Name: .TEST1
30@ CHECK:     SectionData (
31@ CHECK:       0000: 30482DE9 000081E0 08B08DE2 3088BDE8  |0H-.........0...|
32@ CHECK:     )
33@ CHECK:   }
34
35
36@-------------------------------------------------------------------------------
37@ Check .ARM.extab.TEST1 section
38@-------------------------------------------------------------------------------
39@ CHECK:   Section {
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}
46@ 0xB0   = finish
47@-------------------------------------------------------------------------------
48@ CHECK:     SectionData (
49@ CHECK:       0000: 419B0181 B0B08384 00000000           |A...........|
50@ CHECK:     )
51@ CHECK:   }
52
53
54@-------------------------------------------------------------------------------
55@ Check .ARM.exidx.TEST1 section
56@-------------------------------------------------------------------------------
57@ CHECK:   Section {
58@ CHECK:     Name: .ARM.exidx.TEST1
59@ CHECK:     SectionData (
60@ CHECK:       0000: 00000000 00000000                    |........|
61@ CHECK:     )
62@ CHECK:   }
63@ CHECK: ]
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
74@ CHECK:     ]
75