diff options
author | Gabe Black <gabeblack@chromium.org> | 2012-01-11 21:18:59 -0800 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-01-13 21:44:33 -0800 |
commit | 8fb008f79b5e9dee440d2668a8ca13aed34b0454 (patch) | |
tree | dbf228a62ae7788b91bc0361d73ff5e6e9219c88 /arch | |
parent | 07e922f87d3dbf1013e209f97eea442db1e0f998 (diff) |
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 <gabeblack@google.com>
Change-Id: If3b9983865917307a4f546e8a1c35260a5dba7a4
Reviewed-on: https://gerrit.chromium.org/gerrit/14151
Commit-Ready: Gabe Black (Do Not Use) <gabeblack@google.com>
Reviewed-by: Gabe Black (Do Not Use) <gabeblack@google.com>
Tested-by: Gabe Black (Do Not Use) <gabeblack@google.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/lib/board.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/x86/lib/board.c b/arch/x86/lib/board.c index 31a4de22e47..92c7b94a967 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 */ |