[PATCH v3 14/32] elf: Use struct link_map_private for the internal link map

Florian Weimer fweimer@redhat.com
Sun Feb 2 17:41:48 GMT 2025


* Joseph Myers:

> On Thu, 7 Dec 2023, Florian Weimer wrote:
>
>> And struct link_map for the external link map type.  This avoids
>> having different definitions of struct link_map in different
>> translation units, and should help with debugging.
>> 
>> Upcasts (from struct link_map_private * to struct link_map) should
>> use &L->l_public (no actual cast).  Downcasts should use the l_private
>> helper function.
>> 
>> The changes from the move of l_addr, l_name, etc. to l_public.l_addr,
>> l_public.l_name could be avoided if we built glibc with
>> -fms-extensions, but this does not seem to be a good idea because
>> we probably do not want the other extensions enabled by this flag.
>> Introducing access macros for l_addr does not work because some of
>> the l_* names (including l_addr) are used as local variables.
>
> OK provided this has passed build-many-glibcs.py, and with a few notes 
> below:
>
>>  elf/dl-fptr.c                                 |   6 +-
>
> As this file is only built for hppa and hppa builds it with -Wno-error, 
> you should also check the logs for the build of that file for hppa to make 
> sure there are no new warnings indicating any problems with the patch.

Uh-oh, good point.

I've dropped this patch for now because it makes the entire series very
difficult to rebase.

Thanks,
Florian



More information about the Libc-alpha mailing list