Skip to content
Snippets Groups Projects
Commit 4a3efd71 authored by Bin Meng's avatar Bin Meng Committed by Leo Yu-Chi Liang
Browse files

riscv: Fix alignment of RELA sections in the linker scripts


In current linker script both .efi_runtime_rel and .rela.dyn sections
are of RELA type whose entry size is either 12 (RV32) or 24 (RV64).
These two are arranged as a continuous region on purpose so that the
prelink-riscv executable can fix up the PIE addresses in one loop.

However there is an 'ALIGN(8)' between these 2 sections which might
cause a gap to be inserted between these 2 sections to satisfy the
alignment requirement on RV32. This would break the assumption of
the prelink process and generate an unbootable image.

Fixes: 9a6569a0 ("riscv: Update alignment for some sections in linker scripts")
Signed-off-by: default avatarBin Meng <bmeng@tinylab.org>
Reviewed-by: Rick Chen's avatarRick Chen <rick@andestech.com>
parent 217b6373
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment