Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/newlib
diff options
context:
space:
mode:
authorKuba Sejdak <jakub.sejdak@phoesys.com>2016-06-24 15:14:50 +0300
committerCorinna Vinschen <corinna@vinschen.de>2016-06-27 14:23:34 +0300
commitcd169e629ac1891eb4c5e3f7b539186bf80ad394 (patch)
tree21f6a768562a3d43b05bf1fc9a58444fecb0d950 /newlib
parente5e0bd38d2c62cdb06d143c547a6d80f5ac6a941 (diff)
Phoenix-RTOS: Provide __progname symbol for user-space apps.
Diffstat (limited to 'newlib')
-rw-r--r--newlib/libc/sys/phoenix/machine/arm/crt0.S9
1 files changed, 8 insertions, 1 deletions
diff --git a/newlib/libc/sys/phoenix/machine/arm/crt0.S b/newlib/libc/sys/phoenix/machine/arm/crt0.S
index 7c4869159..0ab7da658 100644
--- a/newlib/libc/sys/phoenix/machine/arm/crt0.S
+++ b/newlib/libc/sys/phoenix/machine/arm/crt0.S
@@ -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
- \ No newline at end of file
+
+ .section .data
+__progname:
+ .word 0 \ No newline at end of file