Accept r1 as having the metadata pointer argument if r0 is 0.

This provides backward compatibility with Juniper loaders.

Sponsored by: Juniper Networks
This commit is contained in:
marcel 2011-02-03 17:35:16 +00:00
parent c5d144bf12
commit 59a8457a98

View File

@ -65,14 +65,20 @@ __FBSDID("$FreeBSD$");
ENTRY_NP(btext)
/*
* On entry:
* r0 - metadata pointer or 0
* r1 - if (r0 == 0) then metadata pointer
*/
ASENTRY_NP(_start)
/*
* Move metadata ptr to r12 (ip)
*/
/* Move metadata ptr to r12 (ip) */
mov ip, r0
ldr r0, =0
cmp ip, r0
bne 1f
mov ip, r1
1:
/* Make sure interrupts are disabled. */
mrs r7, cpsr
orr r7, r7, #(I32_bit|F32_bit)