Lines Matching +full:0 +full:- +full:9 +full:a +full:- +full:f

1 /* SPDX-License-Identifier: GPL-2.0-or-later */
12 RELAENT = 9
15 /* A procedure descriptor used when booting this as a COFF file.
17 * linked at 0x500000.
21 .long 0x500000, 0, 0, 0
32 p_toc: .8byte .TOC. - p_base
33 p_dyn: .8byte __dynamic_start - p_base
34 p_rela: .8byte __rela_dyn_start - p_base
35 p_prom: .8byte 0
58 addis r11,r10,(_GLOBAL_OFFSET_TABLE_-p_base)@ha
59 lwz r11,(_GLOBAL_OFFSET_TABLE_-p_base)@l(r11)
60 cmpwi r11,0
61 beq 3f /* if not linked -pie */
64 addis r12,r10,(__dynamic_start-p_base)@ha
65 addi r12,r12,(__dynamic_start-p_base)@l
66 subf r11,r11,r12 /* runtime - linktime offset */
68 /* The dynamic section contains a series of tagged entries.
70 li r9,0
71 li r0,0
72 9: lwz r8,0(r12) /* get tag */
73 cmpwi r8,0
74 beq 10f /* end of list */
76 bne 11f
78 b 12f
82 b 12f
85 bne 12f
88 b 9b
90 /* The relocation section contains a list of relocations.
94 cmpwi r0,0
95 beq 3f
96 cmpwi r9,0
97 beq 3f
98 cmpwi r14,0
99 beq 3f
104 2: lbz r0,4+3(r9) /* ELF32_R_INFO(reloc->r_info) */
107 lwz r12,0(r9) /* reloc->r_offset */
108 lwz r0,8(r9) /* reloc->r_addend */
114 /* Do a cache flush for our text, in case the loader didn't */
115 3: lwz r9,p_start-p_base(r10) /* note: these are relocated now */
116 lwz r8,p_etext-p_base(r10)
119 addi r9,r9,0x20
126 lwz r9,p_bss_start-p_base(r10)
127 lwz r8,p_end-p_base(r10)
128 li r0,0
129 5: stw r0,0(r9)
134 /* Possibly set up a custom stack */
135 lwz r8,p_pstack-p_base(r10)
136 cmpwi r8,0
137 beq 6f
138 lwz r1,0(r8)
139 li r0,0
140 stwu r0,-16(r1) /* establish a stack frame */
144 std r5,(p_prom-p_base)(r10)
147 ld r2,(p_toc-p_base)(r10)
151 ld r11,-32768(r2)
152 cmpwi r11,0
153 beq 3f /* if not linked -pie then no dynamic section */
155 ld r11,(p_dyn-p_base)(r10)
157 ld r9,(p_rela-p_base)(r10)
160 li r13,0
161 li r8,0
162 9: ld r12,0(r11) /* get tag */
163 cmpdi r12,0
164 beq 12f /* end of list */
166 bne 10f
168 b 11f
172 b 11f
175 bne 11f
178 b 9b
180 cmpdi r13,0 /* check we have both RELA, RELASZ, RELAENT*/
181 cmpdi cr1,r8,0
182 beq 3f
183 beq cr1,3f
184 cmpdi r14,0
185 beq 3f
194 13: ld r0,8(r9) /* ELF64_R_TYPE(reloc->r_info) */
197 ld r12,0(r9) /* reloc->r_offset */
198 ld r0,16(r9) /* reloc->r_addend */
204 /* Do a cache flush for our text, in case the loader didn't */
205 3: ld r9,p_start-p_base(r10) /* note: these are relocated now */
206 ld r8,p_etext-p_base(r10)
209 addi r9,r9,0x20
216 ld r9,p_bss_start-p_base(r10)
217 ld r8,p_end-p_base(r10)
218 li r0,0
219 5: std r0,0(r9)
224 /* Possibly set up a custom stack */
225 ld r8,p_pstack-p_base(r10)
226 cmpdi r8,0
227 beq 6f
228 ld r1,0(r8)
229 li r0,0
230 stdu r0,-112(r1) /* establish a stack frame */
245 .rept (\end - \start + 1)
251 #define SAVE_GPRS(start, end, base) OP_REGS std, 8, start, end, base, 0
252 #define REST_GPRS(start, end, base) OP_REGS ld, 8, start, end, base, 0
262 stdu r1,-PROM_FRAME_SIZE(r1) /* Save SP and create stack space */
273 rldicr r10,r10,0,62
277 bcl 20,31,0f
278 0: mflr r10
279 addi r11,r10,(1f-0b)
282 ld r10,(p_prom-0b)(r10)
291 rldicl r1,r1,0,32