From a980d5f86951dca03baa447fd5a58005ba47a098 Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Fri, 30 Dec 2022 23:18:02 +0000 Subject: x1000: Enable support for INIT_ATTR Enable INIT_ATTR support in config.h. Load init code to the codec buffer, following the convention used by other targets that support INIT_ATTR. Change-Id: I8935fbaa100f0013bb328d71c4a49ec2ffafd003 --- firmware/target/mips/ingenic_x1000/crt0.S | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'firmware/target/mips/ingenic_x1000/crt0.S') diff --git a/firmware/target/mips/ingenic_x1000/crt0.S b/firmware/target/mips/ingenic_x1000/crt0.S index 494f3722aa..6c0942b0db 100644 --- a/firmware/target/mips/ingenic_x1000/crt0.S +++ b/firmware/target/mips/ingenic_x1000/crt0.S @@ -75,6 +75,15 @@ _realstart: bal _copy nop +#ifdef HAVE_INIT_ATTR + /* Copy init code */ + la a0, _initcopy + la a1, _initstart + la a2, _initend + bal _copy + nop +#endif + /* Clear the BSS segment (needed to zero-initialize C static values) */ la a0, _bssbegin la a1, _bssend -- cgit v1.2.3