summaryrefslogtreecommitdiff
path: root/sys-libs/musl/files/musl-1.2.4-arm64-crti-alignment.patch
blob: 8b548bdb255f2cb725540a440cbf82f19c5bb897 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
https://git.musl-libc.org/cgit/musl/commit/?id=cbf59dd662cea8786c2f3a5ea21f8da64f002b30
https://github.com/rui314/mold/issues/1255
https://bugs.gentoo.org/931782

From cbf59dd662cea8786c2f3a5ea21f8da64f002b30 Mon Sep 17 00:00:00 2001
From: mojyack <mojyack@gmail.com>
Date: Sun, 12 May 2024 12:13:06 -0400
Subject: aarch64 crti.o: fix alignment of _init/_fini

without explicit alignment directives, whether they end up at the
necessary alignment depends on linker/linking conditions. initially
reported as mold issue 1255.
--- a/crt/aarch64/crti.s
+++ b/crt/aarch64/crti.s
@@ -1,6 +1,7 @@
 .section .init
 .global _init
 .type _init,%function
+.align 2
 _init:
 	stp x29,x30,[sp,-16]!
 	mov x29,sp
@@ -8,6 +9,7 @@ _init:
 .section .fini
 .global _fini
 .type _fini,%function
+.align 2
 _fini:
 	stp x29,x30,[sp,-16]!
 	mov x29,sp
-- 
cgit v1.2.1