riscv: Update alignment for some sections in linker scripts
Some sections in the linker scripts are aligned to 4 bytes, which may cause misaligned exception on some platforms, e.g.: clearing the bss section on 64-bit hardware if __bss_start does not start from a naturally 8 bytes aligned address. Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
This commit is contained in:
parent
3f37baae83
commit
9a6569a043
2 changed files with 4 additions and 4 deletions
|
@ -44,7 +44,7 @@ SECTIONS
|
|||
__binman_sym_end = .;
|
||||
} > .spl_mem
|
||||
|
||||
. = ALIGN(4);
|
||||
. = ALIGN(8);
|
||||
|
||||
_end = .;
|
||||
_image_binary_end = .;
|
||||
|
|
|
@ -57,7 +57,7 @@ SECTIONS
|
|||
__efi_runtime_rel_stop = .;
|
||||
}
|
||||
|
||||
. = ALIGN(4);
|
||||
. = ALIGN(8);
|
||||
|
||||
/DISCARD/ : { *(.rela.plt*) }
|
||||
.rela.dyn : {
|
||||
|
@ -66,7 +66,7 @@ SECTIONS
|
|||
__rel_dyn_end = .;
|
||||
}
|
||||
|
||||
. = ALIGN(4);
|
||||
. = ALIGN(8);
|
||||
|
||||
.dynsym : {
|
||||
__dyn_sym_start = .;
|
||||
|
@ -74,7 +74,7 @@ SECTIONS
|
|||
__dyn_sym_end = .;
|
||||
}
|
||||
|
||||
. = ALIGN(4);
|
||||
. = ALIGN(8);
|
||||
|
||||
_end = .;
|
||||
|
||||
|
|
Loading…
Reference in a new issue