firmware: Relocate when load address is not equal to link address

This patch extends fw_base to relocate to link address whenever
firmware load address is not equal to link address.

The relocation will not work when load start to load end overlap
link start to link end.

Signed-off-by: Anup Patel <anup.patel@wdc.com>
Tested-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
This commit is contained in:
Anup Patel
2019-06-07 20:26:55 +05:30
committed by Anup Patel
parent 6fec1c7e11
commit 331f291e4c
4 changed files with 53 additions and 6 deletions

View File

@@ -13,4 +13,6 @@ ENTRY(_start)
SECTIONS
{
#include "fw_base.ldS"
PROVIDE(_fw_reloc_end = .);
}