diff options
| author | Bruce Evans <bde@FreeBSD.org> | 1997-02-14 10:57:07 +0000 |
|---|---|---|
| committer | Bruce Evans <bde@FreeBSD.org> | 1997-02-14 10:57:07 +0000 |
| commit | b416939d71823e5214a9086634a438b38b176a67 (patch) | |
| tree | 1028f0950d8f99b6d1a52efab13cccf7d834022d /lib/libc | |
| parent | 6e768644e121b2f6b21cdeb7a474c7bf6e9a0fe8 (diff) | |
Notes
Diffstat (limited to 'lib/libc')
| -rw-r--r-- | lib/libc/amd64/SYS.h | 20 | ||||
| -rw-r--r-- | lib/libc/i386/DEFS.h | 22 | ||||
| -rw-r--r-- | lib/libc/i386/SYS.h | 20 |
3 files changed, 21 insertions, 41 deletions
diff --git a/lib/libc/amd64/SYS.h b/lib/libc/amd64/SYS.h index ac65687fdb7b..a1bcab00e8b7 100644 --- a/lib/libc/amd64/SYS.h +++ b/lib/libc/amd64/SYS.h @@ -41,26 +41,6 @@ #include <sys/syscall.h> #include "DEFS.h" -#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 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: PIC_PROLOGUE; jmp PIC_PLT(HIDENAME(cerror)); ENTRY(x); lea __CONCAT(SYS_,x),%eax; KERNCALL; jb 2b #define RSYSCALL(x) SYSCALL(x); ret diff --git a/lib/libc/i386/DEFS.h b/lib/libc/i386/DEFS.h index 252ba3f6adc5..753215ee13c0 100644 --- a/lib/libc/i386/DEFS.h +++ b/lib/libc/i386/DEFS.h @@ -40,6 +40,26 @@ #include <sys/cdefs.h> +#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 PIC_PROLOGUE +#define PIC_EPILOGUE +#define PIC_PLT(x) x +#define PIC_GOT(x) x +#define PIC_GOTOFF(x) x +#endif + /* * CNAME and HIDENAME manage the relationship between symbol names in C * and the equivalent assembly language names. CNAME is given a name as @@ -57,7 +77,7 @@ /* XXX should use align 4,0x90 for -m486. */ -#define _START_ENTRY .align 2,0x90; +#define _START_ENTRY .text; .align 2,0x90; #if 0 /* Data is not used, except perhaps by non-g prof, which we don't support. */ #define _MID_ENTRY .data; .align 2; 8:; .long 0; \ diff --git a/lib/libc/i386/SYS.h b/lib/libc/i386/SYS.h index ac65687fdb7b..a1bcab00e8b7 100644 --- a/lib/libc/i386/SYS.h +++ b/lib/libc/i386/SYS.h @@ -41,26 +41,6 @@ #include <sys/syscall.h> #include "DEFS.h" -#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 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: PIC_PROLOGUE; jmp PIC_PLT(HIDENAME(cerror)); ENTRY(x); lea __CONCAT(SYS_,x),%eax; KERNCALL; jb 2b #define RSYSCALL(x) SYSCALL(x); ret |
