@@ -160,11 +160,6 @@ ifeq (yes,$(have-loop-to-function))
CFLAGS-rtld.c += -fno-tree-loop-distribute-patterns
endif
-ifeq (yes,$(have-loop-to-function))
-# Likewise, during static library startup, memset is not yet available.
-CFLAGS-dl-support.c = -fno-tree-loop-distribute-patterns
-endif
-
# Compile rtld itself without stack protection.
# Also compile all routines in the static library that are elided from
# the shared libc because they are in libc.a in the same way.
@@ -245,6 +245,9 @@ __rtld_lock_define_initialized_recursive (, _dl_load_tls_lock)
int _dl_clktck;
+/* Inhibit memset for auxv_values initialization because memset may not
+ be available yet. */
+inhibit_loop_to_libcall
void
_dl_aux_init (ElfW(auxv_t) *av)
{
@@ -254,11 +257,7 @@ _dl_aux_init (ElfW(auxv_t) *av)
#endif
_dl_auxv = av;
- dl_parse_auxv_t auxv_values;
- /* Use an explicit initialization loop here because memset may not
- be available yet. */
- for (int i = 0; i < array_length (auxv_values); ++i)
- auxv_values[i] = 0;
+ dl_parse_auxv_t auxv_values = { 0 };
_dl_parse_auxv (av, auxv_values);
}
#endif