diff options
author | peter <peter@FreeBSD.org> | 1996-05-05 07:56:21 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1996-05-05 07:56:21 +0000 |
commit | 4b7195c99191637bf59fd4ad626297296bf3610f (patch) | |
tree | bea8a07c70223c0e39939063c6dbbdf8eb9d0f17 /lib/libc/amd64/gen/sigsetjmp.S | |
parent | 93f1aa601a7bda9bd9b83bf5098c3f05f6edd744 (diff) | |
download | FreeBSD-src-4b7195c99191637bf59fd4ad626297296bf3610f.zip FreeBSD-src-4b7195c99191637bf59fd4ad626297296bf3610f.tar.gz |
Add support to enable libc to be compiled in ELF format. (#ifdef __ELF__)
In a nutshell, this macroizes the local/global symbol scoping rules
that are different in a.out and ELF. It also makes the i386 assembler
stubs conform to i386 PIC calling conventions - the a.out ld.so didn't
object, but the ELF one needs it as it implements PIC jumps via PLT's as
well as calls. The a.out rtld only worked because it was accidently
snooping the grandparent calling function's return address off the stack..
This also affects the libc_r code a little, because of cpp macro nesting.
Diffstat (limited to 'lib/libc/amd64/gen/sigsetjmp.S')
-rw-r--r-- | lib/libc/amd64/gen/sigsetjmp.S | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/libc/amd64/gen/sigsetjmp.S b/lib/libc/amd64/gen/sigsetjmp.S index 5cc00f0..1d56f29 100644 --- a/lib/libc/amd64/gen/sigsetjmp.S +++ b/lib/libc/amd64/gen/sigsetjmp.S @@ -33,12 +33,12 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: sigsetjmp.S,v 1.5 1996/01/22 00:00:54 julian Exp $ + * $Id: sigsetjmp.S,v 1.6 1996/02/17 12:25:21 peter Exp $ */ #if defined(LIBC_RCS) && !defined(lint) .text - .asciz "$Id: sigsetjmp.S,v 1.5 1996/01/22 00:00:54 julian Exp $" + .asciz "$Id: sigsetjmp.S,v 1.6 1996/02/17 12:25:21 peter Exp $" #endif /* LIBC_RCS and not lint */ #include "DEFS.h" @@ -69,13 +69,15 @@ ENTRY(sigsetjmp) movl %eax,32(%ecx) testl %eax,%eax jz 1f + PIC_PROLOGUE pushl $0 #ifdef _THREAD_SAFE - call PIC_PLT(__thread_sys_sigblock) + call PIC_PLT(CNAME(_thread_sys_sigblock)) #else - call PIC_PLT(_sigblock) + call PIC_PLT(CNAME(sigblock)) #endif addl $4,%esp + PIC_EPILOGUE movl 4(%esp),%ecx movl %eax,24(%ecx) 1: movl 0(%esp),%edx @@ -97,13 +99,15 @@ ENTRY(siglongjmp) movl 4(%esp),%edx cmpl $0,32(%edx) jz 1f + PIC_PROLOGUE pushl 24(%edx) #ifdef _THREAD_SAFE - call PIC_PLT(__thread_sys_sigsetmask) + call PIC_PLT(CNAME(_thread_sys_sigsetmask)) #else - call PIC_PLT(_sigsetmask) + call PIC_PLT(CNAME(sigsetmask)) #endif addl $4,%esp + PIC_EPILOGUE 1: movl 4(%esp),%edx movl 8(%esp),%eax movl 0(%edx),%ecx |