summaryrefslogtreecommitdiff
path: root/src/thread/x32/syscall_cp_fixup.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2018-09-05 12:43:34 -0400
committerRich Felker <dalias@aerifal.cx>2018-09-05 14:05:14 -0400
commit9b95fd0944e4206949e90633c3fed088202810ec (patch)
tree4af9c66139abfef78854aca3200f836153727c23 /src/thread/x32/syscall_cp_fixup.c
parent2de29bc994029b903a366b8a4a9f8c3c3ee2be90 (diff)
downloadmusl-9b95fd0944e4206949e90633c3fed088202810ec.tar.gz
define and use internal macros for hidden visibility, weak refs
this cleans up what had become widespread direct inline use of "GNU C" style attributes directly in the source, and lowers the barrier to increased use of hidden visibility, which will be useful to recovering some of the efficiency lost when the protected visibility hack was dropped in commit dc2f368e565c37728b0d620380b849c3a1ddd78f, especially on archs where the PLT ABI is costly.
Diffstat (limited to 'src/thread/x32/syscall_cp_fixup.c')
-rw-r--r--src/thread/x32/syscall_cp_fixup.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/thread/x32/syscall_cp_fixup.c b/src/thread/x32/syscall_cp_fixup.c
index b1f3a382..b1a1faa6 100644
--- a/src/thread/x32/syscall_cp_fixup.c
+++ b/src/thread/x32/syscall_cp_fixup.c
@@ -1,8 +1,9 @@
#include <sys/syscall.h>
+#include "libc.h"
-__attribute__((__visibility__("hidden")))
-long __syscall_cp_internal(volatile void*, long long, long long, long long, long long,
- long long, long long, long long);
+hidden long __syscall_cp_internal(volatile void*, long long, long long,
+ long long, long long, long long,
+ long long, long long);
struct __timespec { long long tv_sec; long tv_nsec; };
struct __timespec_kernel { long long tv_sec; long long tv_nsec; };
@@ -12,9 +13,9 @@ struct __timespec_kernel { long long tv_sec; long long tv_nsec; };
ts->tv_nsec = __tsc(X)->tv_nsec; \
(X) = (unsigned long)ts; } } while(0)
-__attribute__((__visibility__("hidden")))
-long __syscall_cp_asm (volatile void * foo, long long n, long long a1, long long a2, long long a3,
- long long a4, long long a5, long long a6)
+hidden long __syscall_cp_asm (volatile void * foo, long long n, long long a1,
+ long long a2, long long a3, long long a4,
+ long long a5, long long a6)
{
struct __timespec_kernel ts[1];
switch (n) {