Mark __cerror as hidden to avoid using the PLT. This is required for new
binutils where the PLT stubs now use %t1 (%r22) which is used to pass the errno to __cerror.
This commit is contained in:
parent
af937be388
commit
fd7fe8589e
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: SYS.h,v 1.11 2020/05/05 20:39:18 skrll Exp $ */
|
||||
/* $NetBSD: SYS.h,v 1.12 2020/05/05 20:43:47 skrll Exp $ */
|
||||
|
||||
/* $OpenBSD: SYS.h,v 1.9 2001/09/20 20:52:09 millert Exp $ */
|
||||
|
||||
|
@ -35,13 +35,17 @@
|
|||
#define SYSENTRY(x) LEAF_ENTRY(x)
|
||||
#define SYSEXIT(x) EXIT(x)
|
||||
|
||||
/*
|
||||
* The restore of rp in the branch to __cerror delay slot is required
|
||||
*/
|
||||
#define SYSCALL(x) !\
|
||||
stw %rp, HPPA_FRAME_ERP(%sr0,%sp) !\
|
||||
ldil L%SYSCALLGATE, %r1 !\
|
||||
ble 4(%sr2, %r1) !\
|
||||
ldi __CONCAT(SYS_,x), %t1 !\
|
||||
.import __cerror, code !\
|
||||
comb,<> %r0, %t1, __cerror !\
|
||||
ldi __CONCAT(SYS_,x), %t1 !\
|
||||
comb,=,n %r0, %t1, 1f !\
|
||||
b __cerror !\
|
||||
1: !\
|
||||
ldw HPPA_FRAME_ERP(%sr0,%sp), %rp
|
||||
|
||||
#define PSEUDO(x,y) !\
|
||||
|
@ -73,3 +77,7 @@ SYSEXIT(x)
|
|||
#define WSYSCALL(weak,strong) !\
|
||||
PSEUDO(weak,weak)
|
||||
#endif
|
||||
|
||||
.global __cerror
|
||||
.hidden __cerror
|
||||
.import __cerror, code
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: __clone.S,v 1.7 2020/05/05 06:20:55 skrll Exp $ */
|
||||
/* $NetBSD: __clone.S,v 1.8 2020/05/05 20:43:47 skrll Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -36,8 +36,6 @@
|
|||
WEAK_ALIAS(clone, __clone)
|
||||
#endif
|
||||
|
||||
.import __cerror, code
|
||||
|
||||
/*
|
||||
* int clone(int (*fn)(void *), void *stack, int flags, void *arg);
|
||||
*/
|
||||
|
@ -46,10 +44,9 @@ ENTRY(__clone, 0)
|
|||
/*
|
||||
* Sanity checks: func and stack may not be NULL.
|
||||
*/
|
||||
ldi EINVAL, %t1
|
||||
comb,= %r0, %arg0, __cerror
|
||||
comb,= %r0, %arg0, 8f
|
||||
nop
|
||||
comb,= %r0, %arg1, __cerror
|
||||
comb,= %r0, %arg1, 8f
|
||||
nop
|
||||
|
||||
/*
|
||||
|
@ -67,6 +64,10 @@ ENTRY(__clone, 0)
|
|||
comb,<>,n %r0, %ret1, 9f
|
||||
bv,n %r0(%rp)
|
||||
|
||||
8:
|
||||
b __cerror
|
||||
ldi EINVAL, %t1
|
||||
|
||||
9: /*
|
||||
* Child: Reload the function and argument from the new stack.
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: __vfork14.S,v 1.8 2020/05/05 06:20:55 skrll Exp $ */
|
||||
/* $NetBSD: __vfork14.S,v 1.9 2020/05/05 20:43:47 skrll Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -57,9 +57,11 @@ ENTRY(__vfork14, 0)
|
|||
copy %rp, %t4
|
||||
ldil L%SYSCALLGATE, %r1
|
||||
ble 4(%sr2, %r1)
|
||||
ldi SYS___vfork14, %t1
|
||||
comb,<> %r0, %t1, __cerror
|
||||
copy %t4, %rp
|
||||
ldi SYS___vfork14, %t1
|
||||
comb,=,n %r0, %t1, 1f
|
||||
b __cerror
|
||||
1:
|
||||
copy %t4, %rp // delay slot of branch to __cerror
|
||||
addi -1, %ret1, %ret1
|
||||
bv %r0(%rp)
|
||||
and %ret0, %ret1, %ret0
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: compat_sigpending.S,v 1.4 2020/05/05 06:11:06 skrll Exp $ */
|
||||
/* $NetBSD: compat_sigpending.S,v 1.5 2020/05/05 20:43:47 skrll Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002 The NetBSD Foundation, Inc.
|
||||
|
@ -32,8 +32,6 @@
|
|||
#include <sys/errno.h>
|
||||
#include "SYS.h"
|
||||
|
||||
.import __cerror, code
|
||||
|
||||
WARN_REFERENCES(sigpending, \
|
||||
"warning: reference to compatibility sigpending(); include <signal.h> for correct reference")
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: compat_sigprocmask.S,v 1.4 2020/05/05 06:11:06 skrll Exp $ */
|
||||
/* $NetBSD: compat_sigprocmask.S,v 1.5 2020/05/05 20:43:47 skrll Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002 The NetBSD Foundation, Inc.
|
||||
|
@ -32,8 +32,6 @@
|
|||
#include <sys/errno.h>
|
||||
#include "SYS.h"
|
||||
|
||||
.import __cerror, code
|
||||
|
||||
WARN_REFERENCES(sigprocmask, \
|
||||
"warning: reference to compatibility sigprocmask(); include <signal.h> for correct reference")
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: compat_sigreturn.S,v 1.4 2020/05/05 06:11:06 skrll Exp $ */
|
||||
/* $NetBSD: compat_sigreturn.S,v 1.5 2020/05/05 20:43:47 skrll Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002 The NetBSD Foundation, Inc.
|
||||
|
@ -32,8 +32,6 @@
|
|||
#include <sys/errno.h>
|
||||
#include "SYS.h"
|
||||
|
||||
.import __cerror, code
|
||||
|
||||
WARN_REFERENCES(sigreturn, \
|
||||
"warning: reference to compatibility sigreturn(); include <signal.h> for correct reference")
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: compat_sigsuspend.S,v 1.4 2020/05/05 06:11:06 skrll Exp $ */
|
||||
/* $NetBSD: compat_sigsuspend.S,v 1.5 2020/05/05 20:43:47 skrll Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002 The NetBSD Foundation, Inc.
|
||||
|
@ -32,8 +32,6 @@
|
|||
#include <sys/errno.h>
|
||||
#include "SYS.h"
|
||||
|
||||
.import __cerror, code
|
||||
|
||||
WARN_REFERENCES(sigsuspend, \
|
||||
"warning: reference to compatibility sigsuspend(); include <signal.h> for correct reference")
|
||||
|
||||
|
|
Loading…
Reference in New Issue