about summary refs log tree commit diff
path: root/src/ldso
diff options
context:
space:
mode:
Diffstat (limited to 'src/ldso')
-rw-r--r--src/ldso/__dlsym.c3
-rw-r--r--src/ldso/dl_iterate_phdr.c3
-rw-r--r--src/ldso/dlclose.c4
-rw-r--r--src/ldso/dlerror.c9
-rw-r--r--src/ldso/dlinfo.c7
-rw-r--r--src/ldso/dlopen.c3
-rw-r--r--src/ldso/tlsdesc.c3
7 files changed, 12 insertions, 20 deletions
diff --git a/src/ldso/__dlsym.c b/src/ldso/__dlsym.c
index 99aafdf9..bf99dff8 100644
--- a/src/ldso/__dlsym.c
+++ b/src/ldso/__dlsym.c
@@ -1,8 +1,7 @@
 #include <dlfcn.h>
 #include "libc.h"
 
-__attribute__((__visibility__("hidden")))
-void __dl_seterr(const char *, ...);
+hidden void __dl_seterr(const char *, ...);
 
 static void *stub_dlsym(void *restrict p, const char *restrict s, void *restrict ra)
 {
diff --git a/src/ldso/dl_iterate_phdr.c b/src/ldso/dl_iterate_phdr.c
index f3160ef4..86c87ef8 100644
--- a/src/ldso/dl_iterate_phdr.c
+++ b/src/ldso/dl_iterate_phdr.c
@@ -4,8 +4,7 @@
 
 #define AUX_CNT 38
 
-__attribute__((__weak__, __visibility__("hidden")))
-extern const size_t _DYNAMIC[];
+extern weak hidden const size_t _DYNAMIC[];
 
 static int static_dl_iterate_phdr(int(*callback)(struct dl_phdr_info *info, size_t size, void *data), void *data)
 {
diff --git a/src/ldso/dlclose.c b/src/ldso/dlclose.c
index 0ef22319..a774209d 100644
--- a/src/ldso/dlclose.c
+++ b/src/ldso/dlclose.c
@@ -1,7 +1,7 @@
 #include <dlfcn.h>
+#include "libc.h"
 
-__attribute__((__visibility__("hidden")))
-int __dl_invalid_handle(void *);
+hidden int __dl_invalid_handle(void *);
 
 int dlclose(void *p)
 {
diff --git a/src/ldso/dlerror.c b/src/ldso/dlerror.c
index 378f0356..c8c718ab 100644
--- a/src/ldso/dlerror.c
+++ b/src/ldso/dlerror.c
@@ -23,8 +23,7 @@ void __dl_thread_cleanup(void)
 		free(self->dlerror_buf);
 }
 
-__attribute__((__visibility__("hidden")))
-void __dl_vseterr(const char *fmt, va_list ap)
+hidden void __dl_vseterr(const char *fmt, va_list ap)
 {
 	va_list ap2;
 	va_copy(ap2, ap);
@@ -43,8 +42,7 @@ void __dl_vseterr(const char *fmt, va_list ap)
 	self->dlerror_flag = 1;
 }
 
-__attribute__((__visibility__("hidden")))
-void __dl_seterr(const char *fmt, ...)
+hidden void __dl_seterr(const char *fmt, ...)
 {
 	va_list ap;
 	va_start(ap, fmt);
@@ -52,8 +50,7 @@ void __dl_seterr(const char *fmt, ...)
 	va_end(ap);
 }
 
-__attribute__((__visibility__("hidden")))
-int __dl_invalid_handle(void *);
+hidden int __dl_invalid_handle(void *);
 
 static int stub_invalid_handle(void *h)
 {
diff --git a/src/ldso/dlinfo.c b/src/ldso/dlinfo.c
index a173d1ac..1e2c5500 100644
--- a/src/ldso/dlinfo.c
+++ b/src/ldso/dlinfo.c
@@ -1,11 +1,10 @@
 #define _GNU_SOURCE
 #include <dlfcn.h>
+#include "libc.h"
 
-__attribute__((__visibility__("hidden")))
-int __dl_invalid_handle(void *);
+hidden int __dl_invalid_handle(void *);
 
-__attribute__((__visibility__("hidden")))
-void __dl_seterr(const char *, ...);
+hidden void __dl_seterr(const char *, ...);
 
 int dlinfo(void *dso, int req, void *res)
 {
diff --git a/src/ldso/dlopen.c b/src/ldso/dlopen.c
index dcdb4398..6b1d792a 100644
--- a/src/ldso/dlopen.c
+++ b/src/ldso/dlopen.c
@@ -1,8 +1,7 @@
 #include <dlfcn.h>
 #include "libc.h"
 
-__attribute__((__visibility__("hidden")))
-void __dl_seterr(const char *, ...);
+hidden void __dl_seterr(const char *, ...);
 
 static void *stub_dlopen(const char *file, int mode)
 {
diff --git a/src/ldso/tlsdesc.c b/src/ldso/tlsdesc.c
index a2985cb6..df7eb9c9 100644
--- a/src/ldso/tlsdesc.c
+++ b/src/ldso/tlsdesc.c
@@ -1,8 +1,7 @@
 #include <stddef.h>
 #include "libc.h"
 
-__attribute__((__visibility__("hidden")))
-ptrdiff_t __tlsdesc_static(), __tlsdesc_dynamic();
+hidden ptrdiff_t __tlsdesc_static(), __tlsdesc_dynamic();
 
 ptrdiff_t __tlsdesc_static()
 {