diff options
author | Russell King <rmk@arm.linux.org.uk> | 2002-08-23 23:11:01 +0000 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2002-08-23 23:11:01 +0000 |
commit | 7c07997dd59d9b3fab322f0ab00459d9456b613c (patch) | |
tree | d79c51d133bbecc93b264541c999b3f4512d6b9f | |
parent | e3f2c66d03c136c2b96c01c03303ade741b68b74 (diff) | |
download | klibc-7c07997dd59d9b3fab322f0ab00459d9456b613c.tar.gz |
MIPS updates.klibc-0.58
-rw-r--r-- | include/arch/mips/klibc/archsetjmp.h | 2 | ||||
-rw-r--r-- | klibc/arch/arm/exits-arm.S | 32 | ||||
-rw-r--r-- | klibc/arch/arm/exits-thumb.S | 35 | ||||
-rw-r--r-- | klibc/arch/mips/MCONFIG | 6 | ||||
-rw-r--r-- | klibc/arch/mips/crt0.S | 2 | ||||
-rw-r--r-- | klibc/arch/mips/include/klibc/archsetjmp.h | 2 | ||||
-rw-r--r-- | klibc/arch/mips/setjmp.S | 4 | ||||
-rw-r--r-- | klibc/arch/mips/vfork.S | 4 |
8 files changed, 13 insertions, 74 deletions
diff --git a/include/arch/mips/klibc/archsetjmp.h b/include/arch/mips/klibc/archsetjmp.h index 0a9448e452467..40e5be2736de2 100644 --- a/include/arch/mips/klibc/archsetjmp.h +++ b/include/arch/mips/klibc/archsetjmp.h @@ -32,7 +32,7 @@ struct __jmp_buf { unsigned long __f31; unsigned long __fcr31; unsigned long __unused; -} __attribute__((align(8))); +} __attribute__((aligned(8))); typedef struct __jmp_buf jmp_buf[1]; diff --git a/klibc/arch/arm/exits-arm.S b/klibc/arch/arm/exits-arm.S deleted file mode 100644 index a923b48a1f15a..0000000000000 --- a/klibc/arch/arm/exits-arm.S +++ /dev/null @@ -1,32 +0,0 @@ -# -# exit and _exit get included in *every* program, and gcc generates -# horrible code for them. Yes, this only saves a few bytes, but -# it does it in every program. -# - -#include <asm/unistd.h> - - .data - .align 4 - .globl __exit_handler - .type __exit_handler,#object -__exit_handler: - .long _exit - .size __exit_handler,4 - - .text - .align 4 - .globl exit - .type exit,#function -exit: - ldr r3, =__exit_handler - ldr r3, [r3, #0] - mov pc, r3 - .size exit,.-exit - - /* No need to save any registers... we're exiting! */ - .globl _exit - .type _exit,#function -_exit: swi __NR_exit - b _exit - .size _exit,.-exit diff --git a/klibc/arch/arm/exits-thumb.S b/klibc/arch/arm/exits-thumb.S deleted file mode 100644 index f1aa564d7e061..0000000000000 --- a/klibc/arch/arm/exits-thumb.S +++ /dev/null @@ -1,35 +0,0 @@ -# -# exit and _exit get included in *every* program, and gcc generates -# horrible code for them. Yes, this only saves a few bytes, but -# it does it in every program. -# - -#include <asm/unistd.h> - - .data - .align 4 - .globl __exit_handler - .type __exit_handler,#object -__exit_handler: - .long _exit - .size __exit_handler,4 - - .text - .align 4 - .globl exit - .type exit,#function - .thumb_func -exit: - ldr r3, =__exit_handler - ldr r3, [r3, #0] - mov pc, r3 - .size exit,.-exit - - /* No need to save any registers... we're exiting! */ - .globl _exit - .type _exit,#function - .thumb_func -_exit: mov r7, #__NR_exit - swi 0 - b _exit - .size _exit,.-exit diff --git a/klibc/arch/mips/MCONFIG b/klibc/arch/mips/MCONFIG index cfda7a5d98b8a..67943619fd327 100644 --- a/klibc/arch/mips/MCONFIG +++ b/klibc/arch/mips/MCONFIG @@ -9,3 +9,9 @@ OPTFLAGS = -Os -fomit-frame-pointer -fno-pic -mno-abicalls BITSIZE = 32 + +# Extra linkflags when building the shared version of the library +# This address needs to be reachable using normal inter-module +# calls, and work on the memory models for this architecture +# 2 MB -- the normal starting point for text is 4 MB. +SHAREDFLAGS = -Ttext 0x00200000 diff --git a/klibc/arch/mips/crt0.S b/klibc/arch/mips/crt0.S index 3ee66dbabc519..a3ce27e6426b0 100644 --- a/klibc/arch/mips/crt0.S +++ b/klibc/arch/mips/crt0.S @@ -15,8 +15,8 @@ NESTED(__start, 32, 16) sw zero, 16(sp) addiu a0, sp, 32 # Pointer to ELF entry structure + move a1, v0 # Kernel-provided atexit() pointer jal __libc_init - move a1, v0 # Kernel-provided atexit() pointer END(__start) diff --git a/klibc/arch/mips/include/klibc/archsetjmp.h b/klibc/arch/mips/include/klibc/archsetjmp.h index 0a9448e452467..40e5be2736de2 100644 --- a/klibc/arch/mips/include/klibc/archsetjmp.h +++ b/klibc/arch/mips/include/klibc/archsetjmp.h @@ -32,7 +32,7 @@ struct __jmp_buf { unsigned long __f31; unsigned long __fcr31; unsigned long __unused; -} __attribute__((align(8))); +} __attribute__((aligned(8))); typedef struct __jmp_buf jmp_buf[1]; diff --git a/klibc/arch/mips/setjmp.S b/klibc/arch/mips/setjmp.S index 3ad76b619a569..9902777e83d4f 100644 --- a/klibc/arch/mips/setjmp.S +++ b/klibc/arch/mips/setjmp.S @@ -41,8 +41,8 @@ LEAF(setjmp) swc1 $f29,84(a0) swc1 $f30,88(a0) swc1 $f31,92(a0) + sw t0,96(a0) jr ra - sw t0,96(a0) END(setjmp) @@ -72,8 +72,8 @@ LEAF(longjmp) lwc1 $f29,84(a0) lwc1 $f30,88(a0) lwc1 $f31,92(a0) + ctc1 t0,$31 jr ra - ctc1 t0,$31 END(longjmp) diff --git a/klibc/arch/mips/vfork.S b/klibc/arch/mips/vfork.S index 562149f9ccfae..aca8083aa4d49 100644 --- a/klibc/arch/mips/vfork.S +++ b/klibc/arch/mips/vfork.S @@ -6,7 +6,7 @@ #define CLONE_VFORK 0x00004000 #define SIGCHLD 18 -LEAF(pipe) +LEAF(vfork) li a0, CLONE_VFORK | CLONE_VM | SIGCHLD li a1, 0 li v0, __NR_clone @@ -16,4 +16,4 @@ LEAF(pipe) 1: sw v0, errno li v0, -1 2: jr ra - END(pipe) + END(vfork) |