From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: from second.openwall.net (second.openwall.net [193.110.157.125]) by inbox.vuxu.org (Postfix) with SMTP id E477C27995 for ; Thu, 10 Oct 2024 22:57:31 +0200 (CEST) Received: (qmail 9633 invoked by uid 550); 10 Oct 2024 20:57:26 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com x-ms-reactions: disallow Received: (qmail 9583 invoked from network); 10 Oct 2024 20:57:25 -0000 Date: Thu, 10 Oct 2024 16:57:16 -0400 From: Rich Felker To: Alex =?utf-8?B?UsO4bm5l?= Petersen Cc: musl@lists.openwall.com Message-ID: <20241010205716.GN10433@brightrain.aerifal.cx> References: <20241010205046.2087319-1-alex@alexrp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20241010205046.2087319-1-alex@alexrp.com> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] [PATCH] arm: Fix _init/_fini alignment in crti.o. On Thu, Oct 10, 2024 at 10:50:46PM +0200, Alex Rønne Petersen wrote: > This is just cbf59dd6 applied to arm. It manifested when compiling for thumb2 > with zig cc (clang) + lld at -O1 or above, but not at -O0. > --- > crt/arm/crti.s | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/crt/arm/crti.s b/crt/arm/crti.s > index 18dc1e41..cccda3ea 100644 > --- a/crt/arm/crti.s > +++ b/crt/arm/crti.s > @@ -3,11 +3,13 @@ > .section .init > .global _init > .type _init,%function > +.align 2 > _init: > push {r0,lr} > > .section .fini > .global _fini > .type _fini,%function > +.align 2 > _fini: > push {r0,lr} > -- > 2.40.1 No objection to this fix, but I wonder if after applying it we should just remove these files entirely. We have NO_LEGACY_INITFINI defined on arm due to a historical mistake, so these will never be called in dynamic-linked programs. I guess theoretically they could be used with static linking, but all functional toolchains will be using init/fini arrays instead or they would be incompatible with dynamic linking. Rich