Phoenix-RTOS: Provide __progname symbol for user-space apps.

This commit is contained in:
Kuba Sejdak 2016-06-24 14:14:50 +02:00 committed by Corinna Vinschen
parent e5e0bd38d2
commit cd169e629a
1 changed files with 8 additions and 1 deletions

View File

@ -28,6 +28,7 @@
.global main
.global exit
.global environ
.global __progname
.align 4
@ -36,7 +37,10 @@ _start:
pop {lr}
ldmfd sp, {r0-r2}
ldr r3, =environ
ldr r4, =__progname
ldr r5, [r1]
str r2, [r3]
str r5, [r4]
/* Align stack. */
bic sp, #0x00000007
@ -44,4 +48,7 @@ _start:
blx lr
ldr lr, =exit
blx lr
.section .data
__progname:
.word 0