diff options
author | Garrett Wollman <wollman@FreeBSD.org> | 1994-08-05 01:19:12 +0000 |
---|---|---|
committer | Garrett Wollman <wollman@FreeBSD.org> | 1994-08-05 01:19:12 +0000 |
commit | 2ceb2ce9eed6efe8076988a9e81722d6a920245d (patch) | |
tree | 3e3913f9a690f2310dfc0d620e8803f623b40b54 /lib/libc/i386/SYS.h | |
parent | 4ea6250be3be954b7960a67df7430716857eff00 (diff) |
First crack at making libc work with the new make macros. It compiles on
my machine, and a simple static (genassym) and shared (sysctl) executable
both work. Still to be done: RPCand YP merge.
Notes
Notes:
svn path=/head/; revision=1849
Diffstat (limited to 'lib/libc/i386/SYS.h')
-rw-r--r-- | lib/libc/i386/SYS.h | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/lib/libc/i386/SYS.h b/lib/libc/i386/SYS.h index dfb679f0d9cd..53837ab541f5 100644 --- a/lib/libc/i386/SYS.h +++ b/lib/libc/i386/SYS.h @@ -1,6 +1,6 @@ /*- - * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. * * This code is derived from software contributed to Berkeley by * William Jolitz. @@ -33,18 +33,34 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)SYS.h 8.1 (Berkeley) 6/4/93 + * from: @(#)SYS.h 5.5 (Berkeley) 5/7/91 + * + * $Id: SYS.h,v 1.3 1993/11/04 00:01:17 paul Exp $ */ #include <sys/syscall.h> +#include "DEFS.h" -#ifdef PROF -#define ENTRY(x) .globl _/**/x; \ - .data; 1:; .long 0; .text; .align 2; _/**/x: \ - movl $1b,%eax; call mcount +#ifdef PIC +#define PIC_PROLOGUE \ + pushl %ebx; \ + call 1f; \ +1: \ + popl %ebx; \ + addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %ebx +#define PIC_EPILOGUE \ + popl %ebx +#define PIC_PLT(x) x@PLT +#define PIC_GOT(x) x@GOT(%ebx) +#define PIC_GOTOFF(x) x@GOTOFF(%ebx) #else -#define ENTRY(x) .globl _/**/x; .text; .align 2; _/**/x: -#endif PROF +#define PIC_PROLOGUE +#define PIC_EPILOGUE +#define PIC_PLT(x) x +#define PIC_GOT(x) x +#define PIC_GOTOFF(x) x +#endif + #define SYSCALL(x) 2: jmp cerror; ENTRY(x); lea SYS_/**/x,%eax; LCALL(7,0); jb 2b #define RSYSCALL(x) SYSCALL(x); ret #define PSEUDO(x,y) ENTRY(x); lea SYS_/**/y, %eax; ; LCALL(7,0); ret |