-1997-03-20 01:49 Ulrich Drepper <drepper@cygnus.com>
+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/libm-ieee754/s_tanhl.c (__tanhl): Correct handling of
- -inf.
+ * 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.
* 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>
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>
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
{
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;
}
}
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
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);
}
}
}
} 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))
} 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));
}
}
} else { /* no fraction part */
- u_int32_t ix;
*iptr = x*one;
/* We must handle NaNs separately. */
if (j0 == 0x80 && (i0 & 0x7fffff))
#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). */
-#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
# 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
# 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
/* 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 */
.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.
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)]
-/* Copyright (C) 1993, 1994, 1995 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 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. */
+/* 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 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 <sysdeps/unix/sysdep.h>
__sigtrampoline.S
clone.S
+start.c
+pipe.S
+fork.S
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
--- /dev/null
+/* 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)
--- /dev/null
+/* 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)
# 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
#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
/* 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 \