From 00422f5696652c04b919d6984adb2cdc21fd6955 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Fri, 27 May 2005 00:23:45 +0000 Subject: With a bit of luck, this might just get mips working again --- libc/sysdeps/linux/mips/crt0.S | 63 ------------------------------------------ 1 file changed, 63 deletions(-) delete mode 100644 libc/sysdeps/linux/mips/crt0.S (limited to 'libc/sysdeps/linux/mips/crt0.S') diff --git a/libc/sysdeps/linux/mips/crt0.S b/libc/sysdeps/linux/mips/crt0.S deleted file mode 100644 index 3ce8c9cd8..000000000 --- a/libc/sysdeps/linux/mips/crt0.S +++ /dev/null @@ -1,63 +0,0 @@ -/* When we enter this piece of code, the program stack looks like this: - argc argument counter (integer) - argv[0] program name (pointer) - argv[1...N] program args (pointers) - argv[argc-1] end of args (integer) - NULL - env[0...N] environment variables (pointers) - NULL -*/ - -#include -#include - -.text - .global __start - .type __start,%function - .type __uClibc_start_main,%function - .weak _init - .weak _fini - .type __uClibc_start_main,%function -/* Stick in a dummy reference to main(), so that if an application - * is linking when the main() function is in a static library (.a) - * we can be sure that main() actually gets linked in */ - .type main,%function - -__start: -#ifdef __PIC__ - .set noreorder - bltzal zero,0f - nop -0: .cpload $31 - .set reorder -#endif - - move $31, zero /* no return, but since the jal kills $31, skip this */ - lw a0, 0($29) /* argc */ - addu a1, $29, 4 /* get to start of argv */ - addu a2, a0, 1 /* argv[0] program name (ordinal->cardinal) */ - sll a2, a2, 2 /* multiple by 4 */ - add a2, a2, a1 /* a2 now points to start of envp */ - la a3, _init /* a3 is address of _init */ - addiu sp, sp, -24 /* 16 + 4 rounded up to multiple of 8 */ - /* multiple of 8 for longlong/double support */ - la v0, _fini - sw v0, 16(sp) /* stack has 5th argument, address of _fini */ - - /* Ok, now run uClibc's main() -- shouldn't return */ - jal __uClibc_start_main - - addiu sp, sp, 24 /* undo stack argument */ - - /* Crash if somehow `exit' returns anyways. */ -hlt: - b hlt - -/* Define a symbol for the first piece of initialized data. */ - .data - .globl __data_start -__data_start: - .long 0 - .weak data_start - data_start = __data_start - -- cgit v1.2.3