path: root/ldso/dlstart.c
diff options
authorRich Felker <>2018-09-05 12:43:34 -0400
committerRich Felker <>2018-09-05 14:05:14 -0400
commit9b95fd0944e4206949e90633c3fed088202810ec (patch)
tree4af9c66139abfef78854aca3200f836153727c23 /ldso/dlstart.c
parent2de29bc994029b903a366b8a4a9f8c3c3ee2be90 (diff)
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 'ldso/dlstart.c')
1 files changed, 3 insertions, 3 deletions
diff --git a/ldso/dlstart.c b/ldso/dlstart.c
index 4dbe1784..20d50f2c 100644
--- a/ldso/dlstart.c
+++ b/ldso/dlstart.c
@@ -1,5 +1,6 @@
#include <stddef.h>
#include "dynlink.h"
+#include "libc.h"
#ifndef START
#define START "_dlstart"
@@ -11,14 +12,13 @@
#define GETFUNCSYM(fp, sym, got) do { \
- __attribute__((__visibility__("hidden"))) void sym(); \
+ hidden void sym(); \
static void (*static_func_ptr)() = sym; \
__asm__ __volatile__ ( "" : "+m"(static_func_ptr) : : "memory"); \
*(fp) = static_func_ptr; } while(0)
-void _dlstart_c(size_t *sp, size_t *dynv)
+hidden void _dlstart_c(size_t *sp, size_t *dynv)
size_t i, aux[AUX_CNT], dyn[DYN_CNT];
size_t *rel, rel_size, base;