arch: aarch64: align .{rodata,data,bss} to 8 bytes

ALIGN(4) is left over from 32-bit linker script templates. On
aarch64 the natural pointer/long alignment is 8, and these sections
usually contain 64-bit constants (pointer tables, 64-bit literals). The
4-byte alignment was harmless because the linker happens to align
individual symbols anyway, but let's just align it properly for the
sake of correctness. For BSS also ensure we have extra padding before
the end of the section.
This commit is contained in:
Ivaylo Ivanov authored and Ивайло Иванов committed 2026-05-28 10:12:51 +03:00
1 parent 94e4b696a6
commit dab24eacef
1 file changed
+4 -3
+4 -3
View File
@@ -50,21 +50,22 @@ SECTIONS
}
#endif
.rodata ALIGN(4) : {
.rodata ALIGN(8) : {
*(.rodata)
*(.rodata.*)
}
.data ALIGN(4) : {
.data ALIGN(8) : {
*(.data)
*(.data.*)
}
.bss ALIGN(4) : {
.bss ALIGN(8) : {
__bss_start = .;
*(.bss)
*(.bss.*)
*(COMMON)
. = ALIGN(8);
__bss_end = .;
}