aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/i386/SYS.h
diff options
context:
space:
mode:
authorJason Evans <jasone@FreeBSD.org>2000-01-29 12:50:47 +0000
committerJason Evans <jasone@FreeBSD.org>2000-01-29 12:50:47 +0000
commite9a89b21962be3dc671d1ff7b108f5f691260cbf (patch)
tree5c7c8a201b289bdedd148bbc78cab4ce92d66dc4 /lib/libc/i386/SYS.h
parentedfd25425508c64dfcc33502c12dfd61f24bfe97 (diff)
downloadsrc-e9a89b21962be3dc671d1ff7b108f5f691260cbf.tar.gz
src-e9a89b21962be3dc671d1ff7b108f5f691260cbf.zip
Undo the ill-conceived breakage of the previous commit and really fix:
For libc_r renamed syscalls, correct symbol naming from _thread_sys_foo() <-- _foo() to _thread_sys_foo() <-- _foo() <-- foo(). This is necessary for system calls which libc_r doesn't define foo(). Some weak symbols such as poll() are defined twice. From what I understand, depending on one weak symbol or the other to be used is a bad idea. All such weak symbols defined in the libc_r-specific code should therefore be made strong (non-weak?). Simplify PSEUDO() to not define any weak symbols, since they aren't ever needed. alpha/SYS.h: Correct reversed usage of WEAK_ALIAS(), which has reversed arguments from __weak_reference(). Also, fix reversal of symbols, so that syscall foo() is a weak alias for _foo(). Add WEAK_ALIAS() call to PRSYSCALL(), which unlike the i386 version of PRSYSCALL(), is not defined in terms of PSYSCALL(). Make PSEUDO() equivalent to the i386 version.
Notes
Notes: svn path=/head/; revision=56809
Diffstat (limited to 'lib/libc/i386/SYS.h')
-rw-r--r--lib/libc/i386/SYS.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/libc/i386/SYS.h b/lib/libc/i386/SYS.h
index 9195f9bc69af..155672f6bb82 100644
--- a/lib/libc/i386/SYS.h
+++ b/lib/libc/i386/SYS.h
@@ -41,17 +41,17 @@
#include <sys/syscall.h>
#include "DEFS.h"
-#define SYSCALL(x) 2: PIC_PROLOGUE; jmp PIC_PLT(HIDENAME(cerror)); \
- ENTRY(__CONCAT(_,x)); \
- .weak CNAME(x); \
- .set CNAME(x),CNAME(__CONCAT(_,x)); \
+#define SYSCALL(x) 2: PIC_PROLOGUE; jmp PIC_PLT(HIDENAME(cerror)); \
+ ENTRY(__CONCAT(_,x)); \
+ .weak CNAME(x); \
+ .set CNAME(x),CNAME(__CONCAT(_,x)); \
lea __CONCAT(SYS_,x),%eax; KERNCALL; jb 2b
#define RSYSCALL(x) SYSCALL(x); ret
-#define PSEUDO(x,y) ENTRY(__CONCAT(_,x)); \
- .weak CNAME(x); \
- .set CNAME(x),CNAME(__CONCAT(_,x)); \
+#define PSEUDO(x,y) ENTRY(__CONCAT(_,x)); \
+ .weak CNAME(x); \
+ .set CNAME(x),CNAME(__CONCAT(_,x)); \
lea __CONCAT(SYS_,y), %eax; KERNCALL; ret
/* gas messes up offset -- although we don't currently need it, do for BCS */
@@ -73,13 +73,13 @@
*/
#define PSYSCALL(x) 2: PIC_PROLOGUE; jmp PIC_PLT(HIDENAME(cerror)); \
ENTRY(__CONCAT(_thread_sys_,x)); \
+ .weak CNAME(__CONCAT(_,x)); \
+ .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(_thread_sys_,x));\
.weak CNAME(x); \
.set CNAME(x),CNAME(__CONCAT(_,x)); \
lea __CONCAT(SYS_,x),%eax; KERNCALL; jb 2b
#define PRSYSCALL(x) PSYSCALL(x); ret
#define PPSEUDO(x,y) ENTRY(__CONCAT(_thread_sys_,x)); \
- .weak CNAME(x); \
- .set CNAME(x),CNAME(__CONCAT(_,x)); \
lea __CONCAT(SYS_,y), %eax; KERNCALL; ret
#else
/*