summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/ppc/start.S
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2001-01-04 20:04:45 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2001-01-04 20:04:45 +0000
commit02fec4701cee79f875c1d02b8b4aee09380dbcb8 (patch)
treef4f291aedbb2e60ee58351481858a8cd3ec80b6b /mdk-stage1/dietlibc/ppc/start.S
parent9887fe04751edf39e8389f2c3ec3f020b5e1c17d (diff)
downloaddrakx-backup-do-not-use-02fec4701cee79f875c1d02b8b4aee09380dbcb8.tar
drakx-backup-do-not-use-02fec4701cee79f875c1d02b8b4aee09380dbcb8.tar.gz
drakx-backup-do-not-use-02fec4701cee79f875c1d02b8b4aee09380dbcb8.tar.bz2
drakx-backup-do-not-use-02fec4701cee79f875c1d02b8b4aee09380dbcb8.tar.xz
drakx-backup-do-not-use-02fec4701cee79f875c1d02b8b4aee09380dbcb8.zip
integrate dietlibc/stdio per default for cdrom and disk only installs
Diffstat (limited to 'mdk-stage1/dietlibc/ppc/start.S')
-rw-r--r--mdk-stage1/dietlibc/ppc/start.S44
1 files changed, 44 insertions, 0 deletions
diff --git a/mdk-stage1/dietlibc/ppc/start.S b/mdk-stage1/dietlibc/ppc/start.S
new file mode 100644
index 000000000..c7afeecd2
--- /dev/null
+++ b/mdk-stage1/dietlibc/ppc/start.S
@@ -0,0 +1,44 @@
+#include "start.h"
+
+#ifdef __powerpc__
+
+.text
+.global _start
+.type _start,@function
+_start:
+ /* Save the stack pointer, in case we're statically linked under Linux. */
+ mr 9,1
+ /* Set up an initial stack frame, and clear the LR. */
+ clrrwi 1,1,4
+ li 0,0
+ stwu 1,-16(1)
+ mtlr 0
+ stw 0,0(1)
+
+ /* r9 enthält den initialen Stackpointer.
+ argc = (r9)
+ argv = (r9+4)
+ envp = argv+(argc+1)*4 */
+
+ lwzu 3,0(9) /* argc */
+ addi 4,9,4 /* argv */
+ add 5,0,3 /* argc... */
+ addi 5,5,1 /* argc+1...*/
+ slwi 5,5,2 /* (argc+1)*4 */
+ add 5,5,4 /* argv+(argc+1)*4 */
+
+ lis 6,environ@ha
+ stw 5,environ@l(6)
+
+ bl main
+ b exit
+.size _start,.-_start
+
+
+/* Define a symbol for the first piece of initialized data. */
+ .section ".data"
+__data_start:
+
+
+#endif
+