From 75831c5b8f101fa853e68f78de72822f1e1db331 Mon Sep 17 00:00:00 2001 From: John Birrell Date: Tue, 5 May 1998 22:06:16 +0000 Subject: [PATCH] Build the syscalls (in libc, not libc_r) with weak symbols so that libpthread can override them as required. --- lib/libc/amd64/SYS.h | 12 +++++++++--- lib/libc/i386/SYS.h | 12 +++++++++--- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/lib/libc/amd64/SYS.h b/lib/libc/amd64/SYS.h index 593b2ed6c1b3..f11fa8612889 100644 --- a/lib/libc/amd64/SYS.h +++ b/lib/libc/amd64/SYS.h @@ -35,17 +35,23 @@ * * from: @(#)SYS.h 5.5 (Berkeley) 5/7/91 * - * $Id: SYS.h,v 1.10 1997/02/22 14:58:30 peter Exp $ + * $Id: SYS.h,v 1.11 1997/04/19 17:05:30 bde Exp $ */ #include #include "DEFS.h" #define SYSCALL(x) 2: PIC_PROLOGUE; jmp PIC_PLT(HIDENAME(cerror)); \ - ENTRY(x); lea __CONCAT(SYS_,x),%eax; KERNCALL; jb 2b + 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(x); lea __CONCAT(SYS_,y), %eax; KERNCALL; ret +#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 */ #define LCALL(x,y) .byte 0x9a ; .long y; .word x diff --git a/lib/libc/i386/SYS.h b/lib/libc/i386/SYS.h index 593b2ed6c1b3..f11fa8612889 100644 --- a/lib/libc/i386/SYS.h +++ b/lib/libc/i386/SYS.h @@ -35,17 +35,23 @@ * * from: @(#)SYS.h 5.5 (Berkeley) 5/7/91 * - * $Id: SYS.h,v 1.10 1997/02/22 14:58:30 peter Exp $ + * $Id: SYS.h,v 1.11 1997/04/19 17:05:30 bde Exp $ */ #include #include "DEFS.h" #define SYSCALL(x) 2: PIC_PROLOGUE; jmp PIC_PLT(HIDENAME(cerror)); \ - ENTRY(x); lea __CONCAT(SYS_,x),%eax; KERNCALL; jb 2b + 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(x); lea __CONCAT(SYS_,y), %eax; KERNCALL; ret +#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 */ #define LCALL(x,y) .byte 0x9a ; .long y; .word x