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.
This commit is contained in:
Ulrich Drepper 1997-03-20 05:17:15 +00:00
parent c57abfa735
commit f752bfe379
17 changed files with 194 additions and 63 deletions

View File

@ -1,7 +1,47 @@
1997-03-20 01:49 Ulrich Drepper <drepper@cygnus.com>
1997-03-20 06:07 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/libm-ieee754/s_tanhl.c (__tanhl): Correct handling of
-inf.
* 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>
* Makeconfig: (rpath-link): Add math/ directory.
(math-objdir): New variable.
@ -47,6 +87,7 @@
* sysdeps/libm-ieee754/s_tanh.c: Handle x == +-0 as a special
case since tanh(-0) == -0.
* sysdeps/libm-ieee754/s_tanhf.c: Likewise.
* sysdeps/libm-ieee754/s_tanhl.c (__tanhl): Correct handling of -inf.
1997-03-19 21:13 Ulrich Drepper <drepper@cygnus.com>
@ -179,7 +220,7 @@
1997-03-18 05:28 Roland McGrath <roland@frob.com>
* elf/dl-reloc.c (RESOLVE): Don't try to resolve ocal symbols.
* elf/dl-reloc.c (RESOLVE): Don't try to resolve local symbols.
1997-03-17 21:39 Philip Blundell <phil@london.uk.eu.org>

View File

@ -79,16 +79,19 @@ main (int argc, char ** argv)
register const struct ltest *lt;
char *ep;
int status = 0;
int save_errno;
for (lt = tests; lt->str != NULL; ++lt)
{
register long int l;
errno = 0;
l = strtol(lt->str, &ep, lt->base);
printf("strtol(\"%s\", , %d) test %u",
lt->str, lt->base, (unsigned int) (lt - tests));
if (l == (long int) lt->expect && *ep == lt->left && errno == lt->err)
l = strtol (lt->str, &ep, lt->base);
save_errno = errno;
printf ("strtol(\"%s\", , %d) test %u",
lt->str, lt->base, (unsigned int) (lt - tests));
if (l == (long int) lt->expect && *ep == lt->left
&& save_errno == lt->err)
puts("\tOK");
else
{
@ -99,13 +102,13 @@ main (int argc, char ** argv)
if (lt->left != *ep)
{
char exp1[5], exp2[5];
expand(exp1, *ep);
expand(exp2, lt->left);
printf(" leaves '%s', expected '%s'\n", exp1, exp2);
expand (exp1, *ep);
expand (exp2, lt->left);
printf (" leaves '%s', expected '%s'\n", exp1, exp2);
}
if (errno != lt->err)
printf(" errno %d (%s) instead of %d (%s)\n",
errno, strerror(errno), lt->err, strerror(lt->err));
printf (" errno %d (%s) instead of %d (%s)\n",
errno, strerror (errno), lt->err, strerror (lt->err));
status = 1;
}
}
@ -115,32 +118,32 @@ main (int argc, char ** argv)
register unsigned long int ul;
errno = 0;
ul = strtoul(lt->str, &ep, lt->base);
printf("strtoul(\"%s\", , %d) test %u",
lt->str, lt->base, (unsigned int) (lt - tests));
ul = strtoul (lt->str, &ep, lt->base);
printf ("strtoul(\"%s\", , %d) test %u",
lt->str, lt->base, (unsigned int) (lt - tests));
if (ul == lt->expect && *ep == lt->left && errno == lt->err)
puts("\tOK");
else
{
puts("\tBAD");
puts ("\tBAD");
if (ul != lt->expect)
printf(" returns %lu, expected %lu\n",
ul, lt->expect);
printf (" returns %lu, expected %lu\n",
ul, lt->expect);
if (lt->left != *ep)
{
char exp1[5], exp2[5];
expand(exp1, *ep);
expand(exp2, lt->left);
printf(" leaves '%s', expected '%s'\n", exp1, exp2);
expand (exp1, *ep);
expand (exp2, lt->left);
printf (" leaves '%s', expected '%s'\n", exp1, exp2);
}
if (errno != lt->err)
printf(" errno %d (%s) instead of %d (%s)\n",
errno, strerror(errno), lt->err, strerror(lt->err));
printf (" errno %d (%s) instead of %d (%s)\n",
errno, strerror (errno), lt->err, strerror (lt->err));
status = 1;
}
}
exit(status ? EXIT_FAILURE : EXIT_SUCCESS);
exit (status ? EXIT_FAILURE : EXIT_SUCCESS);
}
static void
@ -148,11 +151,11 @@ expand (dst, c)
char *dst;
int c;
{
if (isprint(c))
if (isprint (c))
{
dst[0] = c;
dst[1] = '\0';
}
else
(void) sprintf(dst, "%#.3o", (unsigned int) c);
(void) sprintf (dst, "%#.3o", (unsigned int) c);
}

View File

@ -60,7 +60,6 @@ static double one = 1.0;
}
}
} else if (j0>51) { /* no fraction part */
u_int32_t high;
*iptr = x*one;
/* We must handle NaNs separately. */
if (j0 == 0x400 && ((i0 & 0xfffff) | i1))
@ -70,10 +69,8 @@ static double one = 1.0;
} else { /* fraction part in low x */
i = ((u_int32_t)(0xffffffff))>>(j0-20);
if((i1&i)==0) { /* x is integral */
u_int32_t high;
*iptr = x;
GET_HIGH_WORD(high,x);
INSERT_WORDS(x,high&0x80000000,0); /* return +-0 */
INSERT_WORDS(x,i0&0x80000000,0); /* return +-0 */
return x;
} else {
INSERT_WORDS(*iptr,i0,i1&(~i));

View File

@ -55,7 +55,6 @@ static float one = 1.0;
}
}
} else { /* no fraction part */
u_int32_t ix;
*iptr = x*one;
/* We must handle NaNs separately. */
if (j0 == 0x80 && (i0 & 0x7fffff))

View File

@ -53,9 +53,9 @@
#define OPCODE_SLWI(ra,rs,sh) OPCODE_RLWINM(ra,rs,sh,0,31-sh)
#define PPC_DCBST(where) asm __volatile__ ("dcbst 0,%0" : : "r"(where))
+#define PPC_SYNC asm __volatile__ ("sync")
+#define PPC_ISYNC asm __volatile__ ("sync; isync")
+#define PPC_ICBI(where) asm __volatile__ ("icbi 0,%0" : : "r"(where))
#define PPC_SYNC asm __volatile__ ("sync")
#define PPC_ISYNC asm __volatile__ ("sync; isync")
#define PPC_ICBI(where) asm __volatile__ ("icbi 0,%0" : : "r"(where))
/* Use this when you've modified some code, but it won't be in the
instruction fetch queue (or when it doesn't matter if it is). */

View File

@ -1,4 +1,12 @@
#define FUNC(name) \
#ifdef HAVE_ELF
# define FUNC(name) \
.global name; \
.type name,@function; \
.align 4; \
name:
#else
# define FUNC(name) \
.global name; \
.align 4; \
name:
#endif

View File

@ -1,4 +1,4 @@
# Local configure fragment for sysdeps/sparc.
# The assembler on SPARC needs the -fPIC flag even when it's assembler code.
ASFLAGS_SO = -fPIC
ASFLAGS_SO=-fPIC

View File

@ -3,4 +3,4 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
# Local configure fragment for sysdeps/sparc.
# The assembler on SPARC needs the -fPIC flag even when it's assembler code.
ASFLAGS_SO = -fPIC
ASFLAGS_SO=-fPIC

View File

@ -26,7 +26,7 @@
/* Some SPARC opcodes we need to use for self-modifying code. */
#define OPCODE_NOP 0x01000000 /* nop */
#define OPCODE_CALL 0x04000000 /* call ?; add PC-rel word address */
#define OPCODE_CALL 0x40000000 /* call ?; add PC-rel word address */
#define OPCODE_SETHI_G1 0x03000000 /* sethi ?, %g1; add value>>10 */
#define OPCODE_JMP_G1 0x81c06000 /* jmp %g1+?; add lo 10 bits of value */
#define OPCODE_SAVE_SP64 0x9de3bfc0 /* save %sp, -64, %sp */
@ -262,6 +262,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy)
.globl _dl_runtime_resolve
.type _dl_runtime_resolve, @function
_dl_runtime_resolve:
t 1
#call %g0
# Pass two args to fixup: the PLT address computed from the PC saved
# in the PLT's call insn, and the reloc offset passed in %g1.

View File

@ -26,16 +26,19 @@ ENTRY (__sigsetjmp)
return PC. Save the signal mask if requested with a tail-call
for simplicity; it always returns zero. */
#ifdef PIC
mov %o7,%g1
2:
jmpl 1f,%g2
call 1f
nop
1:
sethi %hi(_GLOBAL_OFFSET_TABLE_-(2b-.)),%l7
sethi %hi(C_SYMBOL_NAME (__sigjmp_save)), %g3
st %sp, [%o0 + (JB_SP * 4)]
or %l7,%lo(_GLOBAL_OFFSET_TABLE_-(2b-.)),%l7
add %l7,%o7,%l7
sethi %hi(C_SYMBOL_NAME (__sigjmp_save)), %g3
or %g3,%lo(C_SYMBOL_NAME (__sigjmp_save)), %g3
st %sp, [%o0 + (JB_SP * 4)]
st %fp, [%o0 + (JB_FP * 4)]
mov %g1,%o7
ld [%l7+%g3],%g1
jmp %g1
st %o7, [%o0+(JB_PC*4)]

View File

@ -1,20 +1,20 @@
/* Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
/* Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
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 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.
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. */
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 <sysdeps/unix/sysdep.h>

View File

@ -1,2 +1,5 @@
__sigtrampoline.S
clone.S
start.c
pipe.S
fork.S

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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 \