From Arne Juul <arnej@math.ntnu.no>:
Explicilty reload the mips-ABIcall GOT/$gp in cerror(). cerror() gets called from outside libc (e.g., from libposix's rename(), and if we don't load $t9, cerror() makes wild references using the libposix $gp and coredumps.
This commit is contained in:
parent
67ec8587a0
commit
7e49f8ba22
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cerror.S,v 1.5 1996/09/17 01:32:41 jonathan Exp $ */
|
||||
/* $NetBSD: cerror.S,v 1.6 1998/07/25 03:01:45 jonathan Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991, 1993
|
||||
|
@ -40,7 +40,7 @@
|
|||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
ASMSTR("from: @(#)cerror.s 8.1 (Berkeley) 6/16/93")
|
||||
ASMSTR("$NetBSD: cerror.S,v 1.5 1996/09/17 01:32:41 jonathan Exp $")
|
||||
ASMSTR("$NetBSD: cerror.S,v 1.6 1998/07/25 03:01:45 jonathan Exp $")
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#ifdef ABICALLS
|
||||
|
@ -50,6 +50,9 @@
|
|||
.globl _C_LABEL(errno)
|
||||
LEAF(cerror)
|
||||
.set noreorder
|
||||
#ifdef ABICALLS
|
||||
.cpload t9
|
||||
#endif
|
||||
sw v0, _C_LABEL(errno)
|
||||
li v0, -1
|
||||
j ra
|
||||
|
|
Loading…
Reference in New Issue