This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Introduce <elf-initfini.h> and ELF_INITFINI for all architectures
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- Cc: libc-alpha at sourceware dot org
- Date: Sun, 09 Feb 2020 10:02:11 +0100
- Subject: Re: [PATCH] Introduce <elf-initfini.h> and ELF_INITFINI for all architectures
- References: <87zhfngjot.fsf@oldenburg2.str.redhat.com> <05bdd37e-add4-eee1-c075-c5aa606951a7@linaro.org>
* Adhemerval Zanella:
>> @@ -40,11 +41,6 @@ call_init (struct link_map *l, int argc, char **argv, char **env)
>> && l->l_type == lt_executable)
>> return;
>>
>> - /* Are there any constructors? */
>> - if (l->l_info[DT_INIT] == NULL
>> - && __builtin_expect (l->l_info[DT_INIT_ARRAY] == NULL, 1))
>> - return;
>> -
>
> Is the idea of removing the early return to always print the debug
> message below?
Yes, I think this message is helpful to show what is going on,
although like so many dynamic linker log messages, its wording could
probably be improved.
I do not think it matters today because every object linked by current
GCC contains an ELF constructor (the _ITM_registerTMCloneTable stuff).