summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/sparc
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1997-03-20 05:17:15 +0000
committerUlrich Drepper <drepper@redhat.com>1997-03-20 05:17:15 +0000
commitf752bfe37962db44ac8db553d840f8215966911e (patch)
tree59f831373e01717405dcbbc4ea3b94d82490fa4d /sysdeps/unix/sysv/linux/sparc
parentc57abfa73560ac665e126a66081e1549bcd4645b (diff)
1997-03-20 06:07 Ulrich Drepper <drepper@cygnus.com> * sysdeps/powerpc/dl-machine.h: Fix typo in last change. * sysdeps/unix/sparc/sysdep.h: Update copyright. 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx> * linuxthreads/sysdeps/sparc/pt-machine (RELEASE): Fix. * stdlib/tst-strtol.c: Save the value of errno, printf may modify it. * sysdeps/sparc/DEFS.h [HAVE_ELF]: Use type @function in the FUNC macro on ELF systems. * sysdeps/sparc/configure.in: Fix. * sysdeps/sparc/dl-machine.h: Fix OPCODE_CALL. * sysdeps/sparc/setjmp.S: Fix my bugs. * sysdeps/unix/sysv/linux/sparc/Dist: Add start.c, fork.S, and pipe.S. * sysdeps/unix/sysv/linux/sparc/Makefile: Define asm-CPPFLAGS and as-FLAGS-.so. * sysdeps/unix/sysv/linux/sparc/syscalls.list: Add fork, pipe, and syscall. * sysdeps/unix/sysv/linux/sparc/fork.S: New file. * sysdeps/unix/sysv/linux/sparc/pipe.S: New file. * sysdeps/unix/sysv/linux/sparc/socket.S: Fix. * sysdeps/unix/sysv/linux/sparc/sysdep.h: Fix. * elf/dl-lookup.c (do_lookup): Return true if we found a weak symbol. (_dl_lookup_symbol): Test against the symbol being global not against the symbol being not weak (fixes important problem with the SPARC linker) * sysdeps/unix/sysv/linux/sparc/brk.c: Fix. * sysdeps/unix/sysv/linux/sparc/start.c: Startup code for Linux/SPARC (while I get my asmCPPFLAGS-so variable). 1997-03-20 01:49 Ulrich Drepper <drepper@cygnus.com> * sysdeps/libm-ieee754/s_tanhl.c (__tanhl): Correct handling of -inf. * elf/dl-reloc.c (RESOLVE): Don't try to resolve local symbols.
Diffstat (limited to 'sysdeps/unix/sysv/linux/sparc')
-rw-r--r--sysdeps/unix/sysv/linux/sparc/Dist3
-rw-r--r--sysdeps/unix/sysv/linux/sparc/Makefile5
-rw-r--r--sysdeps/unix/sysv/linux/sparc/fork.S33
-rw-r--r--sysdeps/unix/sysv/linux/sparc/pipe.S37
-rw-r--r--sysdeps/unix/sysv/linux/sparc/syscalls.list3
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sysdep.h12
6 files changed, 86 insertions, 7 deletions
diff --git a/sysdeps/unix/sysv/linux/sparc/Dist b/sysdeps/unix/sysv/linux/sparc/Dist
index 6134c6056d..b50a46fb68 100644
--- a/sysdeps/unix/sysv/linux/sparc/Dist
+++ b/sysdeps/unix/sysv/linux/sparc/Dist
@@ -1,2 +1,5 @@
__sigtrampoline.S
clone.S
+start.c
+pipe.S
+fork.S
diff --git a/sysdeps/unix/sysv/linux/sparc/Makefile b/sysdeps/unix/sysv/linux/sparc/Makefile
index 30ef946c19..4cbd3bd004 100644
--- a/sysdeps/unix/sysv/linux/sparc/Makefile
+++ b/sysdeps/unix/sysv/linux/sparc/Makefile
@@ -2,10 +2,11 @@ ifeq ($(subdir),signal)
sysdep_routines += __sigtrampoline
endif
+asm-CPPFLAGS=-D__ASSEMBLY__
+as-FLAGS-.so=-fPIC
+
# When I get this to work, this is the right thing
ifeq ($(subdir),elf)
CFLAGS-rtld.c += -mv8
#rtld-routines += dl-sysdepsparc
endif # elf
-
-asm-CPPFLAGS = -fPIC
diff --git a/sysdeps/unix/sysv/linux/sparc/fork.S b/sysdeps/unix/sysv/linux/sparc/fork.S
new file mode 100644
index 0000000000..55633f2cde
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/sparc/fork.S
@@ -0,0 +1,33 @@
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Miguel de Icaza <miguel@gnu.ai.mit.edu>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+ Cambridge, MA 02139, USA. */
+
+#include <sysdep.h>
+
+PSEUDO (__libc_fork, fork, 0)
+ tst %o1
+ be,a parent
+ nop
+ /* child: return 0 */
+ clr %o0
+parent:
+ ret
+
+PSEUDO_END (__libc_fork)
+weak_alias (__libc_fork, __fork)
+weak_alias (__libc_fork, fork)
diff --git a/sysdeps/unix/sysv/linux/sparc/pipe.S b/sysdeps/unix/sysv/linux/sparc/pipe.S
new file mode 100644
index 0000000000..4c50656d6c
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/sparc/pipe.S
@@ -0,0 +1,37 @@
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Miguel de Icaza <miguel@gnu.ai.mit.edu>, 1997.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <sysdep.h>
+ .globl __libc_pipe
+ENTRY (__libc_pipe)
+ mov %o0, %o2 /* Save PIPEDES. */
+ mov SYS_ify(pipe),%g1
+ ta 0x10
+ bcc,a 2f
+ nop
+ SYSCALL_ERROR_HANDLER
+2:
+ st %o0, [%o2] /* PIPEDES[0] = %o0; */
+ st %o1, [%o2 + 4] /* PIPEDES[1] = %o1; */
+ retl
+ clr %o0
+
+PSEUDO_END (__libc_pipe)
+weak_alias (__libc_pipe, __pipe)
+weak_alias (__libc_pipe, pipe)
diff --git a/sysdeps/unix/sysv/linux/sparc/syscalls.list b/sysdeps/unix/sysv/linux/sparc/syscalls.list
index 7883d70719..3d59984f1b 100644
--- a/sysdeps/unix/sysv/linux/sparc/syscalls.list
+++ b/sysdeps/unix/sysv/linux/sparc/syscalls.list
@@ -1,3 +1,6 @@
# File name Caller Syscall name # args Strong name Weak names
+fork - fork 0 __fork fork
+pipe - pipe 1 __pipe pipe
s_llseek llseek _llseek 5 __sys_llseek
+syscall - syscall 0 __syscall syscall
diff --git a/sysdeps/unix/sysv/linux/sparc/sysdep.h b/sysdeps/unix/sysv/linux/sparc/sysdep.h
index 5ae440152b..0e5a8cd218 100644
--- a/sysdeps/unix/sysv/linux/sparc/sysdep.h
+++ b/sysdeps/unix/sysv/linux/sparc/sysdep.h
@@ -20,11 +20,6 @@
#ifndef _LINUX_SPARC_SYSDEP_H
#define _LINUX_SPARC_SYSDEP_H 1
-/* Kernel headers use __ASSEMBLY__ */
-#ifdef ASSEMBLER
-#define __ASSEMBLY__
-#endif
-
#include <sysdeps/unix/sparc/sysdep.h>
#undef SYS_ify
@@ -40,6 +35,13 @@
/* Linux/SPARC uses a different trap number */
#undef PSEUDO
+#undef ENTRY
+
+#define ENTRY(name) \
+ .global C_SYMBOL_NAME(name); \
+ .align 2;\
+ C_LABEL(name);\
+ .type name,@function;
#ifdef PIC
#define SYSCALL_ERROR_HANDLER \