aboutsummaryrefslogtreecommitdiff
path: root/elf/libc-early-init.h
diff options
context:
space:
mode:
Diffstat (limited to 'elf/libc-early-init.h')
-rw-r--r--elf/libc-early-init.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/elf/libc-early-init.h b/elf/libc-early-init.h
index a8edfad..ac8c204 100644
--- a/elf/libc-early-init.h
+++ b/elf/libc-early-init.h
@@ -19,12 +19,9 @@
#ifndef _LIBC_EARLY_INIT_H
#define _LIBC_EARLY_INIT_H
-struct link_map;
+#include <libc_early_init_name.h>
-/* If LIBC_MAP is not NULL, look up the __libc_early_init symbol in it
- and call this function, with INITIAL as the argument. */
-void _dl_call_libc_early_init (struct link_map *libc_map, _Bool initial)
- attribute_hidden;
+struct link_map;
/* In the shared case, this function is defined in libc.so and invoked
from ld.so (or on the fist static dlopen) after complete relocation
@@ -33,6 +30,18 @@ void _dl_call_libc_early_init (struct link_map *libc_map, _Bool initial)
startup code. If INITIAL is true, the libc being initialized is
the libc for the main program. INITIAL is false for libcs loaded
for audit modules, dlmopen, and static dlopen. */
-void __libc_early_init (_Bool initial);
+void __libc_early_init (_Bool initial)
+#ifdef SHARED
+/* Redirect to the actual implementation name. */
+ __asm__ (LIBC_EARLY_INIT_NAME_STRING)
+#endif
+ ;
+
+/* Attempts to find the appropriately named __libc_early_init function
+ in LIBC_MAP. On lookup failure, an exception is signaled,
+ indicating an ld.so/libc.so mismatch. */
+__typeof (__libc_early_init) *_dl_lookup_libc_early_init (struct link_map *
+ libc_map)
+ attribute_hidden;
#endif /* _LIBC_EARLY_INIT_H */