From 2edcbc2e0b115cf2b9357f0b246717209c7b6cbf Mon Sep 17 00:00:00 2001 From: jasone Date: Tue, 14 Dec 1999 20:17:52 +0000 Subject: Make setjmp, longjmp, sigsetjmp, and siglongjmp weak aliases for __setjmp, __longjmp, __sigsetjmp, and __siglongjmp, respectively. This supports cancellation in the linuxthreads port. In the long run, a much more comprehensive solution will necessitate more dramatic changes to libc symbol naming, and these aliases will probably need modification at that time. --- lib/libc/amd64/gen/setjmp.S | 8 ++++++-- lib/libc/amd64/gen/sigsetjmp.S | 8 ++++++-- lib/libc/i386/gen/setjmp.S | 8 ++++++-- lib/libc/i386/gen/sigsetjmp.S | 8 ++++++-- 4 files changed, 24 insertions(+), 8 deletions(-) (limited to 'lib') diff --git a/lib/libc/amd64/gen/setjmp.S b/lib/libc/amd64/gen/setjmp.S index 4a85658..c82b7f0 100644 --- a/lib/libc/amd64/gen/setjmp.S +++ b/lib/libc/amd64/gen/setjmp.S @@ -54,7 +54,9 @@ #include "DEFS.h" #include "SYS.h" -ENTRY(setjmp) +ENTRY(__setjmp) +.weak setjmp; +.set setjmp, __setjmp; movl 4(%esp),%ecx PIC_PROLOGUE leal 28(%ecx), %eax @@ -80,7 +82,9 @@ ENTRY(setjmp) xorl %eax,%eax ret -ENTRY(longjmp) +ENTRY(__longjmp) +.weak longjmp; +.set longjmp, __longjmp; movl 4(%esp),%edx PIC_PROLOGUE pushl $0 /* (sigset_t*)oset */ diff --git a/lib/libc/amd64/gen/sigsetjmp.S b/lib/libc/amd64/gen/sigsetjmp.S index 9aa32f4..22cf790 100644 --- a/lib/libc/amd64/gen/sigsetjmp.S +++ b/lib/libc/amd64/gen/sigsetjmp.S @@ -59,7 +59,9 @@ * use sigreturn() if sigreturn() works. */ -ENTRY(sigsetjmp) +ENTRY(__sigsetjmp) +.weak sigsetjmp; +.set sigsetjmp, __sigsetjmp; movl 8(%esp),%eax movl 4(%esp),%ecx movl %eax,44(%ecx) @@ -89,7 +91,9 @@ ENTRY(sigsetjmp) xorl %eax,%eax ret -ENTRY(siglongjmp) +ENTRY(__siglongjmp) +.weak siglongjmp; +.set siglongjmp, __siglongjmp; movl 4(%esp),%edx cmpl $0,44(%edx) jz 2f diff --git a/lib/libc/i386/gen/setjmp.S b/lib/libc/i386/gen/setjmp.S index 4a85658..c82b7f0 100644 --- a/lib/libc/i386/gen/setjmp.S +++ b/lib/libc/i386/gen/setjmp.S @@ -54,7 +54,9 @@ #include "DEFS.h" #include "SYS.h" -ENTRY(setjmp) +ENTRY(__setjmp) +.weak setjmp; +.set setjmp, __setjmp; movl 4(%esp),%ecx PIC_PROLOGUE leal 28(%ecx), %eax @@ -80,7 +82,9 @@ ENTRY(setjmp) xorl %eax,%eax ret -ENTRY(longjmp) +ENTRY(__longjmp) +.weak longjmp; +.set longjmp, __longjmp; movl 4(%esp),%edx PIC_PROLOGUE pushl $0 /* (sigset_t*)oset */ diff --git a/lib/libc/i386/gen/sigsetjmp.S b/lib/libc/i386/gen/sigsetjmp.S index 9aa32f4..22cf790 100644 --- a/lib/libc/i386/gen/sigsetjmp.S +++ b/lib/libc/i386/gen/sigsetjmp.S @@ -59,7 +59,9 @@ * use sigreturn() if sigreturn() works. */ -ENTRY(sigsetjmp) +ENTRY(__sigsetjmp) +.weak sigsetjmp; +.set sigsetjmp, __sigsetjmp; movl 8(%esp),%eax movl 4(%esp),%ecx movl %eax,44(%ecx) @@ -89,7 +91,9 @@ ENTRY(sigsetjmp) xorl %eax,%eax ret -ENTRY(siglongjmp) +ENTRY(__siglongjmp) +.weak siglongjmp; +.set siglongjmp, __siglongjmp; movl 4(%esp),%edx cmpl $0,44(%edx) jz 2f -- cgit v1.1