diff --git a/arch/arm/cpu/uncompress.c b/arch/arm/cpu/uncompress.c index b07087e4c..708c04c1f 100644 --- a/arch/arm/cpu/uncompress.c +++ b/arch/arm/cpu/uncompress.c @@ -50,8 +50,6 @@ void __noreturn barebox_multi_pbl_start(unsigned long membase, void *pg_start; unsigned long pc = get_pc(); - image_end = (void *)&image_end_marker + global_variable_offset(); - if (IS_ENABLED(CONFIG_PBL_RELOCATABLE)) { /* * If we run from inside the memory just relocate the binary @@ -64,6 +62,8 @@ void __noreturn barebox_multi_pbl_start(unsigned long membase, relocate_to_adr(membase); } + image_end = (void *)&image_end_marker + global_variable_offset(); + /* * image_end is the image_end_marker defined above. It is the last location * in the executable. Right after the executable the build process adds