summaryrefslogtreecommitdiffstats
path: root/lib/libc/i386
diff options
context:
space:
mode:
authorandreast <andreast@FreeBSD.org>2013-11-21 22:31:18 +0000
committerandreast <andreast@FreeBSD.org>2013-11-21 22:31:18 +0000
commit305492af4723b9c7a9118c02471b58651d2ec999 (patch)
treef17b7ebad3190908338acdaaee5562f547b46c87 /lib/libc/i386
parent3ce6c522309d1339bd7d2c960630b23199ff13e3 (diff)
downloadFreeBSD-src-305492af4723b9c7a9118c02471b58651d2ec999.zip
FreeBSD-src-305492af4723b9c7a9118c02471b58651d2ec999.tar.gz
Replace the WEAK_ALIAS() alias with the WEAK_REFERENCE() alias. Use it and
get rid of the __CONCAT and CNAME macros. Reviewed by: bde, kib
Diffstat (limited to 'lib/libc/i386')
-rw-r--r--lib/libc/i386/SYS.h25
-rw-r--r--lib/libc/i386/gen/_setjmp.S3
-rw-r--r--lib/libc/i386/gen/setjmp.S3
-rw-r--r--lib/libc/i386/gen/sigsetjmp.S3
-rw-r--r--lib/libc/i386/string/strchr.S2
-rw-r--r--lib/libc/i386/string/strrchr.S2
-rw-r--r--lib/libc/i386/sys/Ovfork.S6
-rw-r--r--lib/libc/i386/sys/getcontext.S6
8 files changed, 20 insertions, 30 deletions
diff --git a/lib/libc/i386/SYS.h b/lib/libc/i386/SYS.h
index 355b117..9a4856a 100644
--- a/lib/libc/i386/SYS.h
+++ b/lib/libc/i386/SYS.h
@@ -36,22 +36,19 @@
#include <sys/syscall.h>
#include <machine/asm.h>
-#define SYSCALL(x) ENTRY(__CONCAT(__sys_,x)); \
- .weak CNAME(x); \
- .set CNAME(x),CNAME(__CONCAT(__sys_,x)); \
- .weak CNAME(__CONCAT(_,x)); \
- .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \
- mov __CONCAT($SYS_,x),%eax; KERNCALL; \
- jb HIDENAME(cerror)
+#define SYSCALL(name) ENTRY(__sys_##name); \
+ WEAK_REFERENCE(__sys_##name, name); \
+ WEAK_REFERENCE(__sys_##name, _##name); \
+ mov $SYS_##name,%eax; KERNCALL; \
+ jb HIDENAME(cerror)
-#define RSYSCALL(x) SYSCALL(x); ret; END(__CONCAT(__sys_,x))
+#define RSYSCALL(name) SYSCALL(name); ret; END(__sys_##name)
-#define PSEUDO(x) ENTRY(__CONCAT(__sys_,x)); \
- .weak CNAME(__CONCAT(_,x)); \
- .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \
- mov __CONCAT($SYS_,x),%eax; KERNCALL; \
- jb HIDENAME(cerror); ret; \
- END(__CONCAT(__sys_,x))
+#define PSEUDO(name) ENTRY(__sys_##name); \
+ WEAK_REFERENCE(__sys_##name, _##name); \
+ mov $SYS_##name,%eax; KERNCALL; \
+ jb HIDENAME(cerror); ret; \
+ END(__sys_##name)
/* gas messes up offset -- although we don't currently need it, do for BCS */
#define LCALL(x,y) .byte 0x9a ; .long y; .word x
diff --git a/lib/libc/i386/gen/_setjmp.S b/lib/libc/i386/gen/_setjmp.S
index 3d9fdb4..c5996c6 100644
--- a/lib/libc/i386/gen/_setjmp.S
+++ b/lib/libc/i386/gen/_setjmp.S
@@ -60,8 +60,7 @@ ENTRY(_setjmp)
ret
END(_setjmp)
- .weak CNAME(_longjmp)
- .set CNAME(_longjmp),CNAME(___longjmp)
+ WEAK_REFERENCE(___longjmp, _longjmp)
ENTRY(___longjmp)
movl 4(%esp),%edx
movl 8(%esp),%eax
diff --git a/lib/libc/i386/gen/setjmp.S b/lib/libc/i386/gen/setjmp.S
index a409e35..6e15868 100644
--- a/lib/libc/i386/gen/setjmp.S
+++ b/lib/libc/i386/gen/setjmp.S
@@ -78,8 +78,7 @@ ENTRY(setjmp)
ret
END(setjmp)
- .weak CNAME(longjmp)
- .set CNAME(longjmp),CNAME(__longjmp)
+ WEAK_REFERENCE(__longjmp, longjmp)
ENTRY(__longjmp)
movl 4(%esp),%edx
PIC_PROLOGUE
diff --git a/lib/libc/i386/gen/sigsetjmp.S b/lib/libc/i386/gen/sigsetjmp.S
index 936edba..0920b6d 100644
--- a/lib/libc/i386/gen/sigsetjmp.S
+++ b/lib/libc/i386/gen/sigsetjmp.S
@@ -87,8 +87,7 @@ ENTRY(sigsetjmp)
ret
END(sigsetjmp)
- .weak CNAME(siglongjmp);
- .set CNAME(siglongjmp),CNAME(__siglongjmp)
+ WEAK_REFERENCE(__siglongjmp, siglongjmp)
ENTRY(__siglongjmp)
movl 4(%esp),%edx
cmpl $0,44(%edx)
diff --git a/lib/libc/i386/string/strchr.S b/lib/libc/i386/string/strchr.S
index f57c2cd..83aa87f 100644
--- a/lib/libc/i386/string/strchr.S
+++ b/lib/libc/i386/string/strchr.S
@@ -63,6 +63,6 @@ L2:
ret
END(strchr)
-WEAK_ALIAS(index, strchr)
+WEAK_REFERENCE(strchr, index)
.section .note.GNU-stack,"",%progbits
diff --git a/lib/libc/i386/string/strrchr.S b/lib/libc/i386/string/strrchr.S
index 5ec5287..5e250b0 100644
--- a/lib/libc/i386/string/strrchr.S
+++ b/lib/libc/i386/string/strrchr.S
@@ -64,6 +64,6 @@ L2:
ret
END(strrchr)
-WEAK_ALIAS(rindex, strrchr)
+WEAK_REFERENCE(strrchr, rindex)
.section .note.GNU-stack,"",%progbits
diff --git a/lib/libc/i386/sys/Ovfork.S b/lib/libc/i386/sys/Ovfork.S
index 3ef7169..b364920 100644
--- a/lib/libc/i386/sys/Ovfork.S
+++ b/lib/libc/i386/sys/Ovfork.S
@@ -38,10 +38,8 @@ __FBSDID("$FreeBSD$");
#include "SYS.h"
- .weak _vfork
- .set _vfork,__sys_vfork
- .weak vfork
- .set vfork,__sys_vfork
+ WEAK_REFERENCE(__sys_vfork, _vfork)
+ WEAK_REFERENCE(__sys_vfork, vfork)
ENTRY(__sys_vfork)
popl %ecx /* my rta into ecx */
mov $SYS_vfork,%eax
diff --git a/lib/libc/i386/sys/getcontext.S b/lib/libc/i386/sys/getcontext.S
index 7114689..4923382 100644
--- a/lib/libc/i386/sys/getcontext.S
+++ b/lib/libc/i386/sys/getcontext.S
@@ -34,10 +34,8 @@ __FBSDID("$FreeBSD$");
* Otherwise, the setcontext() syscall will return here and we'll
* pop off the return address and go to the *setcontext* call.
*/
- .weak _getcontext
- .set _getcontext,__sys_getcontext
- .weak getcontext
- .set getcontext,__sys_getcontext
+ WEAK_REFERENCE(__sys_getcontext, _getcontext)
+ WEAK_REFERENCE(__sys_getcontext, getcontext)
ENTRY(__sys_getcontext)
movl (%esp),%ecx /* save getcontext return address */
mov $SYS_getcontext,%eax
OpenPOWER on IntegriCloud