[PATCH] elf: Simplify _dl_aux_init with inhibit_loop_to_libcall
Szabolcs Nagy
szabolcs.nagy@arm.com
Thu Mar 31 08:56:06 GMT 2022
The 03/29/2022 21:11, Fangrui Song wrote:
> +/* 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);
this does not work for me
https://godbolt.org/z/s49TMP3z7
More information about the Libc-alpha
mailing list