Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 931782 - sys-libs/musl: broken crti.o for arm64
Summary: sys-libs/musl: broken crti.o for arm64
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM64 Linux
: Normal normal (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: systemwide-mold
  Show dependency tree
 
Reported: 2024-05-12 05:45 UTC by mojyack
Modified: 2024-05-20 08:16 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
musl-crti-alignment.patch (file_931782.txt,410 bytes, patch)
2024-05-12 05:48 UTC, Sam James
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mojyack 2024-05-12 05:45:36 UTC
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.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-05-12 05:48:15 UTC
Created attachment 892752 [details, diff]
musl-crti-alignment.patch
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-05-12 05:48:43 UTC
dalias, would you mind taking a look please?
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-05-18 04:56:27 UTC
Thank you for the patch. dalias has kindly committed it upstream. I'll pull it in probably later today.
Comment 4 mojyack 2024-05-18 06:12:49 UTC
Nice!
Comment 5 Larry the Git Cow gentoo-dev 2024-05-20 08:16:55 UTC
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(+)