mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
elf: Add initial flag argument to __libc_early_init
The rseq initialization should happen only for the libc in the base namespace (in the dynamic case) or the statically linked libc. The __libc_multiple_libcs flag does not quite cover this case at present, so this commit introduces a flag argument to __libc_early_init, indicating whether the libc being libc is the primary one (of the main program). Reviewed-by: Carlos O'Donell <carlos@redhat.com>
This commit is contained in:
@ -23,7 +23,7 @@
|
||||
#include <stddef.h>
|
||||
|
||||
void
|
||||
_dl_call_libc_early_init (struct link_map *libc_map)
|
||||
_dl_call_libc_early_init (struct link_map *libc_map, _Bool initial)
|
||||
{
|
||||
/* There is nothing to do if we did not actually load libc.so. */
|
||||
if (libc_map == NULL)
|
||||
@ -37,5 +37,5 @@ _dl_call_libc_early_init (struct link_map *libc_map)
|
||||
assert (sym != NULL);
|
||||
__typeof (__libc_early_init) *early_init
|
||||
= DL_SYMBOL_ADDRESS (libc_map, sym);
|
||||
early_init ();
|
||||
early_init (initial);
|
||||
}
|
||||
|
Reference in New Issue
Block a user