diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-03-29 22:31:12 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-03-29 22:31:12 +0000 |
commit | f5980ff9299c469eb5c6920e67e9bf2b70925bba (patch) | |
tree | ccf5db83d81935b06f5416dd0680c8e2bb11ba09 /ldso/ldso/mips | |
parent | 7719784a54932bac1db98d46a1933f3b1bbd192d (diff) |
More mips support from sjhill
Diffstat (limited to 'ldso/ldso/mips')
-rw-r--r-- | ldso/ldso/mips/boot1_arch.h | 32 | ||||
-rw-r--r-- | ldso/ldso/mips/dl-startup.h | 32 | ||||
-rw-r--r-- | ldso/ldso/mips/dl-syscalls.h | 8 | ||||
-rw-r--r-- | ldso/ldso/mips/ld_syscalls.h | 8 |
4 files changed, 80 insertions, 0 deletions
diff --git a/ldso/ldso/mips/boot1_arch.h b/ldso/ldso/mips/boot1_arch.h new file mode 100644 index 000000000..e86ff77cf --- /dev/null +++ b/ldso/ldso/mips/boot1_arch.h @@ -0,0 +1,32 @@ +/* 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. + */ + +asm(" + .text + .globl _dl_boot +_dl_boot: + .set noreorder + bltzal $0, 0f + nop +0: .cpload $31 + .set reorder + # i386 ABI book says that the first entry of GOT holds + # the address of the dynamic structure. Though MIPS ABI + # doesn't say nothing about this, I emulate this here. + la $4, _DYNAMIC + # Subtract OFFSET_GP_GOT + sw $4, -0x7ff0($28) + move $4, $29 + la $8, coff + bltzal $8, coff +coff: subu $8, $31, $8 + la $25, _dl_boot2 + addu $25, $8 + jalr $25 +"); + +#define _dl_boot _dl_boot2 +#define DL_BOOT(X) static void __attribute__ ((unused)) _dl_boot (X) diff --git a/ldso/ldso/mips/dl-startup.h b/ldso/ldso/mips/dl-startup.h new file mode 100644 index 000000000..e86ff77cf --- /dev/null +++ b/ldso/ldso/mips/dl-startup.h @@ -0,0 +1,32 @@ +/* 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. + */ + +asm(" + .text + .globl _dl_boot +_dl_boot: + .set noreorder + bltzal $0, 0f + nop +0: .cpload $31 + .set reorder + # i386 ABI book says that the first entry of GOT holds + # the address of the dynamic structure. Though MIPS ABI + # doesn't say nothing about this, I emulate this here. + la $4, _DYNAMIC + # Subtract OFFSET_GP_GOT + sw $4, -0x7ff0($28) + move $4, $29 + la $8, coff + bltzal $8, coff +coff: subu $8, $31, $8 + la $25, _dl_boot2 + addu $25, $8 + jalr $25 +"); + +#define _dl_boot _dl_boot2 +#define DL_BOOT(X) static void __attribute__ ((unused)) _dl_boot (X) diff --git a/ldso/ldso/mips/dl-syscalls.h b/ldso/ldso/mips/dl-syscalls.h index 2327219df..feb54d4cf 100644 --- a/ldso/ldso/mips/dl-syscalls.h +++ b/ldso/ldso/mips/dl-syscalls.h @@ -4,6 +4,12 @@ * Linux/MIPS 2.4.17 version kernel. */ +#ifndef _SYS_STAT_H +#define _SYS_STAT_H + +#define new_stat stat +#include <asm/stat.h> + #define __NR_SYSCALL_BASE 4000 #define __NR_exit (__NR_SYSCALL_BASE + 1) @@ -135,3 +141,5 @@ type name(atype a, btype b, ctype c, dtype d) \ return (type) __v0; \ return (type) -1; \ } + +#endif diff --git a/ldso/ldso/mips/ld_syscalls.h b/ldso/ldso/mips/ld_syscalls.h index 2327219df..feb54d4cf 100644 --- a/ldso/ldso/mips/ld_syscalls.h +++ b/ldso/ldso/mips/ld_syscalls.h @@ -4,6 +4,12 @@ * Linux/MIPS 2.4.17 version kernel. */ +#ifndef _SYS_STAT_H +#define _SYS_STAT_H + +#define new_stat stat +#include <asm/stat.h> + #define __NR_SYSCALL_BASE 4000 #define __NR_exit (__NR_SYSCALL_BASE + 1) @@ -135,3 +141,5 @@ type name(atype a, btype b, ctype c, dtype d) \ return (type) __v0; \ return (type) -1; \ } + +#endif |