OSDN Git Service

Patch from Stefan Allius and Edie C. Dost to add SuperH
[uclinux-h8/uClibc.git] / ldso / ldso / mips / boot1_arch.h
1 /* Any assmbly language/system dependent hacks needed to setup boot1.c so it
2  * will work as expected and cope with whatever platform specific wierdness is
3  * needed for this architecture.
4  */
5
6 asm("
7         .text
8         .globl _dl_boot
9 _dl_boot:
10         .set noreorder
11         bltzal $0, 0f
12         nop
13 0:      .cpload $31
14         .set reorder
15         la $4, _DYNAMIC
16         sw $4, -0x7ff0($28)
17         move $4, $29
18         la $8, coff
19         .set noreorder
20         bltzal $0, coff
21         nop
22 coff:   subu $8, $31, $8
23         .set reorder
24         la $25, _dl_boot2
25         addu $25, $8
26         jalr $25
27         lw $4, 0($29)
28         la $5, 4($29)
29         sll $6, $4, 2
30         addu $6, $6, $5
31         addu $6, $6, 4
32         la $7, _dl_elf_main
33         lw $25, 0($7)
34         jr $25
35 ");
36
37 #define _dl_boot _dl_boot2
38 #define LD_BOOT(X)   static void __attribute__ ((unused)) _dl_boot (X)