mirror of
https://github.com/ivoszbg/uniLoader.git
synced 2026-08-15 05:18:32 +00:00
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:
@@ -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 = .;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user