From: Rich Felker <dalias@libc.org>
To: "Alex Rønne Petersen" <alex@alexrp.com>
Cc: musl@lists.openwall.com
Subject: Re: [musl] [PATCH] arm: Fix _init/_fini alignment in crti.o.
Date: Thu, 10 Oct 2024 16:57:16 -0400 [thread overview]
Message-ID: <20241010205716.GN10433@brightrain.aerifal.cx> (raw)
In-Reply-To: <20241010205046.2087319-1-alex@alexrp.com>
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
next prev parent reply other threads:[~2024-10-10 20:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-10 20:50 Alex Rønne Petersen
2024-10-10 20:57 ` Rich Felker [this message]
2024-10-10 21:21 ` Alex Rønne Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241010205716.GN10433@brightrain.aerifal.cx \
--to=dalias@libc.org \
--cc=alex@alexrp.com \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).