diff options
author | wollman <wollman@FreeBSD.org> | 1994-08-05 01:19:12 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1994-08-05 01:19:12 +0000 |
commit | e017c781cac0ce8879390a958837f07f3ae09f36 (patch) | |
tree | 3e3913f9a690f2310dfc0d620e8803f623b40b54 /lib/libc/amd64/SYS.h | |
parent | 962b8cc8e0b8959ba3824a40a58f846de4027f04 (diff) | |
download | FreeBSD-src-e017c781cac0ce8879390a958837f07f3ae09f36.zip FreeBSD-src-e017c781cac0ce8879390a958837f07f3ae09f36.tar.gz |
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.
Diffstat (limited to 'lib/libc/amd64/SYS.h')
-rw-r--r-- | lib/libc/amd64/SYS.h | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/lib/libc/amd64/SYS.h b/lib/libc/amd64/SYS.h index dfb679f..53837ab 100644 --- a/lib/libc/amd64/SYS.h +++ b/lib/libc/amd64/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 |