[PATCH v3 20/32] elf: Add l_soname accessor function for DT_SONAME values
Florian Weimer
fweimer@redhat.com
Sun Feb 2 17:23:45 GMT 2025
* Joseph Myers:
> On Thu, 7 Dec 2023, Florian Weimer wrote:
>
>> @@ -1414,8 +1414,7 @@ cannot enable executable stack as shared object requires");
>> loading. Add it right away. */
>> if (__glibc_unlikely (GLRO(dl_profile) != NULL)
>> && l->l_info[DT_SONAME] != NULL)
>> - add_name_to_object (l, ((const char *) D_PTR (l, l_info[DT_STRTAB])
>> - + l->l_info[DT_SONAME]->d_un.d_val));
>> + add_name_to_object (l, l_soname (l));
>
> In this place you're not using l_soname in the != NULL check, but in other
> places you've moved such checks to use l_soname (l) != NULL.
>
> OK with this place changed to be consistent with the others (assuming
> there isn't some deliberate reason for the difference).
It's now:
if (__glibc_unlikely (GLRO(dl_profile) != NULL) && l_soname(l) != NULL)
add_name_to_object (l, l_soname (l));
Will push this separately after testing.
Thanks,
Florian
More information about the Libc-alpha
mailing list