[PATCH 05/21] MIPS: reloc: mark relocate_code() as noreturn
Denis Orlov
denorl2009 at gmail.com
Mon Jul 24 22:05:06 PDT 2023
After relocating the code we jump straight to it, with the function
having an 'unreachable()' call at the end. So add an appropriate
attribute.
Signed-off-by: Denis Orlov <denorl2009 at gmail.com>
---
arch/mips/lib/reloc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/mips/lib/reloc.c b/arch/mips/lib/reloc.c
index 3c845a9663..83b4040d95 100644
--- a/arch/mips/lib/reloc.c
+++ b/arch/mips/lib/reloc.c
@@ -41,7 +41,7 @@
#include <asm-generic/memory_layout.h>
void main_entry(void *fdt, u32 fdt_size);
-void relocate_code(void *fdt, u32 fdt_size, u32 relocaddr);
+void __noreturn relocate_code(void *fdt, u32 fdt_size, u32 relocaddr);
/**
* read_uint() - Read an unsigned integer from the buffer
@@ -106,7 +106,7 @@ static void apply_reloc(unsigned int type, void *addr, long off)
}
}
-void relocate_code(void *fdt, u32 fdt_size, u32 ram_size)
+void __noreturn relocate_code(void *fdt, u32 fdt_size, u32 ram_size)
{
unsigned long addr, length, bss_len, relocaddr, new_stack;
uint8_t *buf;
--
2.41.0
More information about the barebox
mailing list