diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2022-12-30 23:18:02 +0000 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2022-12-31 08:10:41 -0500 |
commit | a980d5f86951dca03baa447fd5a58005ba47a098 (patch) | |
tree | f315d780c0bee54aef6c2d925e7ab19ca0d9c4c3 /firmware/target/mips/ingenic_x1000/crt0.S | |
parent | ea7b80dab0ee9f087c1db76975d9490db8b189d1 (diff) | |
download | rockbox-a980d5f86951dca03baa447fd5a58005ba47a098.tar.gz rockbox-a980d5f86951dca03baa447fd5a58005ba47a098.zip |
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
Diffstat (limited to 'firmware/target/mips/ingenic_x1000/crt0.S')
-rw-r--r-- | firmware/target/mips/ingenic_x1000/crt0.S | 9 |
1 files changed, 9 insertions, 0 deletions
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: | |||
75 | bal _copy | 75 | bal _copy |
76 | nop | 76 | nop |
77 | 77 | ||
78 | #ifdef HAVE_INIT_ATTR | ||
79 | /* Copy init code */ | ||
80 | la a0, _initcopy | ||
81 | la a1, _initstart | ||
82 | la a2, _initend | ||
83 | bal _copy | ||
84 | nop | ||
85 | #endif | ||
86 | |||
78 | /* Clear the BSS segment (needed to zero-initialize C static values) */ | 87 | /* Clear the BSS segment (needed to zero-initialize C static values) */ |
79 | la a0, _bssbegin | 88 | la a0, _bssbegin |
80 | la a1, _bssend | 89 | la a1, _bssend |