See github.com/rui314/mold/issues/1255 (Sorry, the link is hidden because I created a new account.) musl's crti.o has not aligned .init and .fini section, which produces broken binaries if linked by particular linker(like mold). I suggest adding the patch in the link to musl.
Created attachment 892752 [details, diff] musl-crti-alignment.patch
dalias, would you mind taking a look please?
Thank you for the patch. dalias has kindly committed it upstream. I'll pull it in probably later today.
Nice!
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9aabd6aa9abd2c48f85cb582fadf81eae944600f commit 9aabd6aa9abd2c48f85cb582fadf81eae944600f Author: Sam James <sam@gentoo.org> AuthorDate: 2024-05-20 08:16:22 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-05-20 08:16:42 +0000 sys-libs/musl: fix crti.o on arm64 Closes: https://bugs.gentoo.org/931782 Signed-off-by: Sam James <sam@gentoo.org> .../files/musl-1.2.4-arm64-crti-alignment.patch | 32 ++++ sys-libs/musl/musl-1.2.4-r2.ebuild | 205 ++++++++++++++++++++ sys-libs/musl/musl-1.2.5-r1.ebuild | 207 +++++++++++++++++++++ 3 files changed, 444 insertions(+)