about summary refs log tree commit diff
path: root/elf/libc-early-init.h
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2022-08-25 18:46:41 +0200
committerFlorian Weimer <fweimer@redhat.com>2022-08-25 18:46:43 +0200
commit89baed0b93639180fd7d0ba922873b003649c7af (patch)
tree3d560f9563c042eb46fdd0a088d24e470b5e907d /elf/libc-early-init.h
parent025a8cce63a1d9b3ea9e84d0e844f14ec872e184 (diff)
downloadglibc-89baed0b93639180fd7d0ba922873b003649c7af.tar.gz
glibc-89baed0b93639180fd7d0ba922873b003649c7af.tar.xz
glibc-89baed0b93639180fd7d0ba922873b003649c7af.zip
Revert "Detect ld.so and libc.so version inconsistency during startup"
This reverts commit 6f85dbf102ad7982409ba0fe96886caeb6389fef.

Once this change hits the release branches, it will require relinking
of all statically linked applications before static dlopen works
again, for the majority of updates on release branches: The NEWS file
is regularly updated with bug references, so the __libc_early_init
suffix changes, and static dlopen cannot find the function anymore.

While this ABI check is still technically correct (we do require
rebuilding & relinking after glibc updates to keep static dlopen
working), it is too drastic for stable release branches.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Diffstat (limited to 'elf/libc-early-init.h')
-rw-r--r--elf/libc-early-init.h21
1 files changed, 6 insertions, 15 deletions
diff --git a/elf/libc-early-init.h b/elf/libc-early-init.h
index ac8c204bc7..a8edfadfb0 100644
--- a/elf/libc-early-init.h
+++ b/elf/libc-early-init.h
@@ -19,10 +19,13 @@
 #ifndef _LIBC_EARLY_INIT_H
 #define _LIBC_EARLY_INIT_H
 
-#include <libc_early_init_name.h>
-
 struct link_map;
 
+/* 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;
+
 /* 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
    of a new loaded libc.so, but before user-defined ELF constructors
@@ -30,18 +33,6 @@ struct link_map;
    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)
-#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;
+void __libc_early_init (_Bool initial);
 
 #endif /* _LIBC_EARLY_INIT_H */