summaryrefslogtreecommitdiff
path: root/lib/libc/arch
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2002-11-06 20:47:46 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2002-11-06 20:47:46 +0000
commit60735805896012b6000a99f7de1678fd7cbfa3b6 (patch)
treeb05879af4e8e4dcd54fd21c0030518188a1447e0 /lib/libc/arch
parent81927e28107cccf3e832b4d98c95a149fef9a8e0 (diff)
Move the weak definition from before the syscall's entry point to
after. This avoids a bunch of reloc warnings by working around a deficiency in the a.out loader. miod@ OK
Diffstat (limited to 'lib/libc/arch')
-rw-r--r--lib/libc/arch/m68k/SYS.h24
1 files changed, 11 insertions, 13 deletions
diff --git a/lib/libc/arch/m68k/SYS.h b/lib/libc/arch/m68k/SYS.h
index 2c5cd215982..d7c84963340 100644
--- a/lib/libc/arch/m68k/SYS.h
+++ b/lib/libc/arch/m68k/SYS.h
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: SYS.h,v 1.13 2002/11/05 22:19:55 marc Exp $
+ * $OpenBSD: SYS.h,v 1.14 2002/11/06 20:47:45 millert Exp $
*/
#include <sys/syscall.h>
@@ -60,6 +60,7 @@
#define __SYSCALL_NOERROR(p,x,y) \
__ENTRY(p,x); \
+ __ALIAS(p,x); \
__DO_SYSCALL(y)
/* perform a syscall, set errno */
@@ -92,19 +93,16 @@
#endif
/*
- * For the thread_safe versions, we prepend _thread_sys_ to the function
- * name so that the 'C' wrapper can go around the real name.
+ * System calls entry points are really named _thread_sys_{syscall},
+ * and weakly aliased to the name {syscall}. This allows the thread
+ * library to replace system calls at link time.
*/
-# define SYSCALL(x) __ALIAS(_thread_sys_,x) \
- __SYSCALL(_thread_sys_,x,x)
-# define RSYSCALL(x) __ALIAS(_thread_sys_,x) \
- __PSEUDO(_thread_sys_,x,x)
-# define PSEUDO(x,y) __ALIAS(_thread_sys_,x) \
- __PSEUDO(_thread_sys_,x,y)
-# define PSEUDO_NOERROR(x,y) __ALIAS(_thread_sys_,x) \
- __PSEUDO_NOERROR(_thread_sys_,x,y)
-# define SYSENTRY(x) __ALIAS(_thread_sys_,x) \
- __ENTRY(_thread_sys_,x)
+# define SYSCALL(x) __SYSCALL(_thread_sys_,x,x)
+# define RSYSCALL(x) __PSEUDO(_thread_sys_,x,x)
+# define PSEUDO(x,y) __PSEUDO(_thread_sys_,x,y)
+# define PSEUDO_NOERROR(x,y) __PSEUDO_NOERROR(_thread_sys_,x,y)
+# define SYSENTRY(x) __ENTRY(_thread_sys_,x) \
+ __ALIAS(_thread_sys_,x)
#define ASMSTR .asciz