From 8fb008f79b5e9dee440d2668a8ca13aed34b0454 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Wed, 11 Jan 2012 21:18:59 -0800 Subject: X86: Make calculate_relocation_address an overridable function Different systems may have different mechanisms for picking a suitable place to relocate U-Boot to. BUG=None TEST=Built and booted on Lumpy. Built for Kaen. Signed-off-by: Gabe Black Change-Id: If3b9983865917307a4f546e8a1c35260a5dba7a4 Reviewed-on: https://gerrit.chromium.org/gerrit/14151 Commit-Ready: Gabe Black (Do Not Use) Reviewed-by: Gabe Black (Do Not Use) Tested-by: Gabe Black (Do Not Use) --- arch/x86/lib/board.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/x86/lib/board.c b/arch/x86/lib/board.c index 31a4de22e4..92c7b94a96 100644 --- a/arch/x86/lib/board.c +++ b/arch/x86/lib/board.c @@ -155,7 +155,7 @@ static void display_flash_config (ulong size) */ typedef int (init_fnc_t) (void); -static int calculate_relocation_address(void); +int calculate_relocation_address(void); static int copy_uboot_to_ram(void); static int clear_bss(void); static int do_elf_reloc_fixups(void); @@ -188,7 +188,10 @@ init_fnc_t *init_sequence_r[] = { NULL, }; -static int calculate_relocation_address(void) +int calculate_relocation_address(void) + __attribute__((weak, alias("__calculate_relocation_address"))); + +int __calculate_relocation_address(void) { void *text_start = &__text_start; /* keep .bss variables aligned */ -- cgit v1.2.3