diff options
author | jasone <jasone@FreeBSD.org> | 1999-12-24 00:03:00 +0000 |
---|---|---|
committer | jasone <jasone@FreeBSD.org> | 1999-12-24 00:03:00 +0000 |
commit | 15ffad75ecb526a3de3193b14541051276bc1d9f (patch) | |
tree | a9d8341bd696044d91fc566f5ab7aae3a4fe4ef0 /lib | |
parent | 83381f85df803a921a0514bb105acffcc8e4f7bd (diff) | |
download | FreeBSD-src-15ffad75ecb526a3de3193b14541051276bc1d9f.zip FreeBSD-src-15ffad75ecb526a3de3193b14541051276bc1d9f.tar.gz |
Creating weak symbols doesn't work correctly when building an aout libc.
Doing the "right thing" here is difficult, so create two ENTRY points for
each function (for example, __setjmp and setjmp are equivalent). This
isn't pretty, but it works for both aout and ELF.
libc symbol naming needs an overhaul in order to properly support function
wrapping, specifically in the case of a real libpthread, and these
duplicate entry points should be fixed as part of that overhaul.
Pointed out by: bde
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/amd64/gen/setjmp.S | 6 | ||||
-rw-r--r-- | lib/libc/amd64/gen/sigsetjmp.S | 6 | ||||
-rw-r--r-- | lib/libc/i386/gen/setjmp.S | 6 | ||||
-rw-r--r-- | lib/libc/i386/gen/sigsetjmp.S | 6 |
4 files changed, 8 insertions, 16 deletions
diff --git a/lib/libc/amd64/gen/setjmp.S b/lib/libc/amd64/gen/setjmp.S index c82b7f0..32a246e 100644 --- a/lib/libc/amd64/gen/setjmp.S +++ b/lib/libc/amd64/gen/setjmp.S @@ -55,8 +55,7 @@ #include "SYS.h" ENTRY(__setjmp) -.weak setjmp; -.set setjmp, __setjmp; +ENTRY(setjmp) movl 4(%esp),%ecx PIC_PROLOGUE leal 28(%ecx), %eax @@ -83,8 +82,7 @@ ENTRY(__setjmp) ret ENTRY(__longjmp) -.weak longjmp; -.set longjmp, __longjmp; +ENTRY(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 22cf790..68ad093 100644 --- a/lib/libc/amd64/gen/sigsetjmp.S +++ b/lib/libc/amd64/gen/sigsetjmp.S @@ -60,8 +60,7 @@ */ ENTRY(__sigsetjmp) -.weak sigsetjmp; -.set sigsetjmp, __sigsetjmp; +ENTRY(sigsetjmp) movl 8(%esp),%eax movl 4(%esp),%ecx movl %eax,44(%ecx) @@ -92,8 +91,7 @@ ENTRY(__sigsetjmp) ret ENTRY(__siglongjmp) -.weak siglongjmp; -.set siglongjmp, __siglongjmp; +ENTRY(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 c82b7f0..32a246e 100644 --- a/lib/libc/i386/gen/setjmp.S +++ b/lib/libc/i386/gen/setjmp.S @@ -55,8 +55,7 @@ #include "SYS.h" ENTRY(__setjmp) -.weak setjmp; -.set setjmp, __setjmp; +ENTRY(setjmp) movl 4(%esp),%ecx PIC_PROLOGUE leal 28(%ecx), %eax @@ -83,8 +82,7 @@ ENTRY(__setjmp) ret ENTRY(__longjmp) -.weak longjmp; -.set longjmp, __longjmp; +ENTRY(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 22cf790..68ad093 100644 --- a/lib/libc/i386/gen/sigsetjmp.S +++ b/lib/libc/i386/gen/sigsetjmp.S @@ -60,8 +60,7 @@ */ ENTRY(__sigsetjmp) -.weak sigsetjmp; -.set sigsetjmp, __sigsetjmp; +ENTRY(sigsetjmp) movl 8(%esp),%eax movl 4(%esp),%ecx movl %eax,44(%ecx) @@ -92,8 +91,7 @@ ENTRY(__sigsetjmp) ret ENTRY(__siglongjmp) -.weak siglongjmp; -.set siglongjmp, __siglongjmp; +ENTRY(siglongjmp) movl 4(%esp),%edx cmpl $0,44(%edx) jz 2f |