commit
5ea320f0f0
@ -161,12 +161,13 @@ _start:
|
|||||||
adrp x1, _DYNAMIC
|
adrp x1, _DYNAMIC
|
||||||
add x1, x1, #:lo12:_DYNAMIC
|
add x1, x1, #:lo12:_DYNAMIC
|
||||||
bl _relocate
|
bl _relocate
|
||||||
cbnz x0, 0f
|
cbnz x0, .L_exit
|
||||||
|
|
||||||
ldp x0, x1, [sp, #16]
|
ldp x0, x1, [sp, #16]
|
||||||
bl _entry
|
bl _entry
|
||||||
|
|
||||||
0: ldp x29, x30, [sp], #32
|
.L_exit:
|
||||||
|
ldp x29, x30, [sp], #32
|
||||||
ret
|
ret
|
||||||
|
|
||||||
// hand-craft a dummy .reloc section so EFI knows it's a relocatable executable:
|
// hand-craft a dummy .reloc section so EFI knows it's a relocatable executable:
|
||||||
|
@ -32,12 +32,13 @@ _start:
|
|||||||
adrp x1, _DYNAMIC
|
adrp x1, _DYNAMIC
|
||||||
add x1, x1, #:lo12:_DYNAMIC
|
add x1, x1, #:lo12:_DYNAMIC
|
||||||
bl _relocate
|
bl _relocate
|
||||||
cbnz x0, 0f
|
cbnz x0, .L_exit
|
||||||
|
|
||||||
ldp x0, x1, [sp, #16]
|
ldp x0, x1, [sp, #16]
|
||||||
bl _entry
|
bl _entry
|
||||||
|
|
||||||
0: ldp x29, x30, [sp], #32
|
.L_exit:
|
||||||
|
ldp x29, x30, [sp], #32
|
||||||
ret
|
ret
|
||||||
|
|
||||||
// hand-craft a dummy .reloc section so EFI knows it's a relocatable executable:
|
// hand-craft a dummy .reloc section so EFI knows it's a relocatable executable:
|
||||||
|
@ -163,12 +163,13 @@ _start:
|
|||||||
sub r0, r0, #0x1000
|
sub r0, r0, #0x1000
|
||||||
bl _relocate
|
bl _relocate
|
||||||
teq r0, #0
|
teq r0, #0
|
||||||
bne 0f
|
bne .L_exit
|
||||||
|
|
||||||
ldmfd sp, {r0-r1}
|
ldmfd sp, {r0-r1}
|
||||||
bl _entry
|
bl _entry
|
||||||
|
|
||||||
0: add sp, sp, #12
|
.L_exit:
|
||||||
|
add sp, sp, #12
|
||||||
ldr pc, [sp], #4
|
ldr pc, [sp], #4
|
||||||
|
|
||||||
.L_DYNAMIC:
|
.L_DYNAMIC:
|
||||||
|
@ -153,11 +153,12 @@ _start:
|
|||||||
popl %ebx
|
popl %ebx
|
||||||
popl %ebx
|
popl %ebx
|
||||||
testl %eax,%eax
|
testl %eax,%eax
|
||||||
jne .exit
|
jne .L_exit
|
||||||
|
|
||||||
call _entry # call app with "image" and "systab" argument
|
call _entry # call app with "image" and "systab" argument
|
||||||
|
|
||||||
.exit: leave
|
.L_exit:
|
||||||
|
leave
|
||||||
ret
|
ret
|
||||||
|
|
||||||
// hand-craft a dummy .reloc section so EFI knows it's a relocatable executable:
|
// hand-craft a dummy .reloc section so EFI knows it's a relocatable executable:
|
||||||
|
@ -58,11 +58,12 @@ _start:
|
|||||||
popl %ebx
|
popl %ebx
|
||||||
popl %ebx
|
popl %ebx
|
||||||
testl %eax,%eax
|
testl %eax,%eax
|
||||||
jne .exit
|
jne .L_exit
|
||||||
|
|
||||||
call _entry # call app with "image" and "systab" argument
|
call _entry # call app with "image" and "systab" argument
|
||||||
|
|
||||||
.exit: leave
|
.L_exit:
|
||||||
|
leave
|
||||||
ret
|
ret
|
||||||
|
|
||||||
// hand-craft a dummy .reloc section so EFI knows it's a relocatable executable:
|
// hand-craft a dummy .reloc section so EFI knows it's a relocatable executable:
|
||||||
|
@ -32,13 +32,14 @@ _start:
|
|||||||
la.local $a0, ImageBase // a0: ImageBase
|
la.local $a0, ImageBase // a0: ImageBase
|
||||||
la.local $a1, _DYNAMIC // a1: DynamicSection
|
la.local $a1, _DYNAMIC // a1: DynamicSection
|
||||||
bl _relocate
|
bl _relocate
|
||||||
bnez $a0, 0f
|
bnez $a0, .L_exit
|
||||||
|
|
||||||
ld.d $a0, $sp, 8
|
ld.d $a0, $sp, 8
|
||||||
ld.d $a1, $sp, 16
|
ld.d $a1, $sp, 16
|
||||||
bl _entry
|
bl _entry
|
||||||
|
|
||||||
0: ld.d $ra, $sp, 0
|
.L_exit:
|
||||||
|
ld.d $ra, $sp, 0
|
||||||
addi.d $sp, $sp, 24
|
addi.d $sp, $sp, 24
|
||||||
jr $ra
|
jr $ra
|
||||||
|
|
||||||
|
@ -159,12 +159,13 @@ _start:
|
|||||||
lla a0, ImageBase
|
lla a0, ImageBase
|
||||||
lla a1, _DYNAMIC
|
lla a1, _DYNAMIC
|
||||||
call _relocate
|
call _relocate
|
||||||
bne a0, zero, 0f
|
bne a0, zero, .L_exit
|
||||||
ld a1, 8(sp)
|
ld a1, 8(sp)
|
||||||
ld a0, 0(sp)
|
ld a0, 0(sp)
|
||||||
call _entry
|
call _entry
|
||||||
ld ra, 16(sp)
|
ld ra, 16(sp)
|
||||||
0: addi sp, sp, 24
|
.L_exit:
|
||||||
|
addi sp, sp, 24
|
||||||
ret
|
ret
|
||||||
|
|
||||||
// hand-craft a dummy .reloc section so EFI knows it's a relocatable executable:
|
// hand-craft a dummy .reloc section so EFI knows it's a relocatable executable:
|
||||||
|
@ -27,12 +27,13 @@ _start:
|
|||||||
lla a0, ImageBase
|
lla a0, ImageBase
|
||||||
lla a1, _DYNAMIC
|
lla a1, _DYNAMIC
|
||||||
call _relocate
|
call _relocate
|
||||||
bne a0, zero, 0f
|
bne a0, zero, .L_exit
|
||||||
ld a1, 8(sp)
|
ld a1, 8(sp)
|
||||||
ld a0, 0(sp)
|
ld a0, 0(sp)
|
||||||
call _entry
|
call _entry
|
||||||
ld ra, 16(sp)
|
ld ra, 16(sp)
|
||||||
0: addi sp, sp, 24
|
.L_exit:
|
||||||
|
addi sp, sp, 24
|
||||||
ret
|
ret
|
||||||
|
|
||||||
// hand-craft a dummy .reloc section so EFI knows it's a relocatable executable:
|
// hand-craft a dummy .reloc section so EFI knows it's a relocatable executable:
|
||||||
|
@ -60,7 +60,7 @@ _start:
|
|||||||
call _entry
|
call _entry
|
||||||
addq $8, %rsp
|
addq $8, %rsp
|
||||||
|
|
||||||
.exit:
|
.L_exit:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
// hand-craft a dummy .reloc section so EFI knows it's a relocatable executable:
|
// hand-craft a dummy .reloc section so EFI knows it's a relocatable executable:
|
||||||
|
Loading…
Reference in New Issue
Block a user