This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Introduce ELF_INITFINI for all architectures
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 8 Aug 2018 07:54:33 -0700
- Subject: Re: [PATCH] Introduce ELF_INITFINI for all architectures
- References: <20180623214521.290CE402DFEF9@oldenburg.str.redhat.com> <7e88376d-17ee-2015-4b9a-6cf788971f15@redhat.com>
On Tue, Jul 3, 2018 at 2:59 AM, Florian Weimer <fweimer@redhat.com> wrote:
> On 06/23/2018 11:45 PM, Florian Weimer wrote:
>>
>> 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 RISC-V.
>>
>> 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.
>>
>> 2018-06-23 Florian Weimer <fweimer@redhat.com>
>>
>> Introduce ELF_INITFINI, set everywhere except on RISC-V.
>> * sysdeps/init_array/crti.S: Move to ...
>> * sysdepes/generic/crti.S: here. Report an error if ELF_INITFINI.
>> * sysdeps/init_array/crtn.S: Move to ...
>> * sysdeps/generic/crtn.S: here. Report an error if ELF_INITFINI.
>> * csu/elf-init.c: Check ELF_INITFINI instead of NO_INITFINI.
>> * gmon/gmon-start.c [!ELF_INITFINI] (GMON_START_ARRAY_SECTION):
>> Define.
>> * elf/dl-fini.c (_dl_fini): Check for ELF_INITFINI before using
>> DT_FINI.
>> * elf/dl-init.c (call_init): Check for ELF_INITFINI before using
>> DT_INIT.
>> * nptl/pt-crti.S [ELF_INITFINI]: Use .init_array instead of
>> PREINIT_FUNCTION.
>> * sysdeps/generic/platform-params.h: New file.
>> * sysdeps/init_array/elf-init.c: Remove file.
>> * sysdeps/init_array/gmon-start.c: Likewise.
>> * sysdeps/init_array/pt-crti.S: Likewise.
>> * sysdeps/riscv/Implies (init_array): Remove.
>> * sysdeps/riscv/platform-params.h: New file.
>
>
> The ChangeLog rewriter corrupted the previous patch. I'm attaching a
> corrected version.
>
LGTM.
Thanks.
--
H.J.