summaryrefslogtreecommitdiff
path: root/ldso/ldso/mips/dl-startup.h
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-05-02 13:36:53 +0000
committerEric Andersen <andersen@codepoet.org>2002-05-02 13:36:53 +0000
commit4a5a81ac165c040935a8807a580db49d381dc443 (patch)
tree7fcd5458f95399731b537e1cfd22538ee2d03c19 /ldso/ldso/mips/dl-startup.h
parent776eae615326f6439734b05fa39c335bf2dc681b (diff)
Patch from Steven J. Hill <sjhill@realitydiluted.com>:
I am very pleased to announce that the MIPS dynamic linker/loader for uClibc is now working. It works on big and little endian platforms. A few minor changes were needed to avoid breaking ldd, and since this makes some non-trivial changes, I have tested on x86, arm, and powerpc to be sure thoese arches didn't get broken. Excellent work Steven!
Diffstat (limited to 'ldso/ldso/mips/dl-startup.h')
-rw-r--r--ldso/ldso/mips/dl-startup.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/ldso/ldso/mips/dl-startup.h b/ldso/ldso/mips/dl-startup.h
index f439ee4bc..05aaf9ebb 100644
--- a/ldso/ldso/mips/dl-startup.h
+++ b/ldso/ldso/mips/dl-startup.h
@@ -1,7 +1,6 @@
/* Any assmbly language/system dependent hacks needed to setup boot1.c so it
* will work as expected and cope with whatever platform specific wierdness is
- * needed for this architecture. See arm/boot1_arch.h for an example of what
- * can be done.
+ * needed for this architecture.
*/
asm("
@@ -13,7 +12,6 @@ _dl_boot:
nop
0: .cpload $31
.set reorder
- # Store offset of DYNAMIC section in first entry of GOT
la $4, _DYNAMIC
sw $4, -0x7ff0($28)
move $4, $29
@@ -23,6 +21,14 @@ coff: subu $8, $31, $8
la $25, _dl_boot2
addu $25, $8
jalr $25
+ lw $4, 0($29)
+ la $5, 4($29)
+ sll $6, $4, 2
+ addu $6, $6, $5
+ addu $6, $6, 4
+ la $7, _dl_elf_main
+ lw $25, 0($7)
+ jr $25
");
#define _dl_boot _dl_boot2