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 <fweimer at redhat dot com>
- To: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 18 Feb 2020 15:13:04 +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:
> On 20/12/2019 11:23, Florian Weimer wrote:
>> This change is desirable for a rework of the statically linked startup
>> code to remove the generic ROP trampoline in it (bug 23323).
>>
>> I verified that the *crt*.o files are unchanged by this change after
>> stripping (although my binutils dispatcher fails to determine the
>> correct ABI for some of the MIPS gcrt1.o files, so those have not been
>> checked).
>>
>> Thanks,
>> Florian
>> 8<------------------------------------------------------------------8<
>>
>> This supersedes the init_array sysdeps directory. It allows us to
>> check for ELF_INITFINI in both C and assembler code, and skip DT_INIT
>> and DT_FINI processing completely on newer architectures.
>>
>> A new header file is needed because <dl-machine.h> is incompatible
>> with assembler code. <sysdep.h> is compatible with assembler code,
>> but it cannot be included in all assembler files because on some
>> architectures, it redefines register names, and some assembler files
>> conflict with that.
>>
>> <elf-initfini.h> is replicated for legacy architectures which need
>> DT_INIT/DT_FINI support. New architectures follow the generic default
>> and disable it.
>
> LGTM, with only a small clarification below.
>
> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
I've fixed up the years and URLs and pushed this.
Thanks,
Florian