diff options
author | bde <bde@FreeBSD.org> | 1997-02-14 10:57:07 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1997-02-14 10:57:07 +0000 |
commit | 10b3d5abf856f043c36cba06071549cb6c93a0ca (patch) | |
tree | 1028f0950d8f99b6d1a52efab13cccf7d834022d /lib/libc/i386/DEFS.h | |
parent | 6a98120bf12e969772a97c58983f18fe332010a6 (diff) | |
download | FreeBSD-src-10b3d5abf856f043c36cba06071549cb6c93a0ca.zip FreeBSD-src-10b3d5abf856f043c36cba06071549cb6c93a0ca.tar.gz |
Moved definitions of PIC macros from SYS.h to DEFS.h so that SYS.h
doesn't need to be included in files that have nothing to do with
syscalls.
Added missing `.text' to START_ENTRY so that ENTRY() works when
invoked in the data section.
Diffstat (limited to 'lib/libc/i386/DEFS.h')
-rw-r--r-- | lib/libc/i386/DEFS.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/lib/libc/i386/DEFS.h b/lib/libc/i386/DEFS.h index 252ba3f..753215e 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; \ |