summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2022-12-03 11:27:20 +0000
committerAidan MacDonald <amachronic@protonmail.com>2022-12-18 22:14:22 +0000
commite8ad52be94fde3e99162c33ac94558e797a733e5 (patch)
tree40fb89e2af0a96ce688b141b310b12b871f949d0
parent68af18a56f343525e92df6e5425a1f1ca39fd576 (diff)
downloadrockbox-e8ad52be94.tar.gz
rockbox-e8ad52be94.zip
x1000: Rename crt0 .init sections to .startup
Avoid startup code clashing with the .init section, which is by convention used for INIT_ATTR code that can be discarded after app initialization. Change-Id: Id59b7618ef41e65c33fc0f133644e07555a913eb
-rw-r--r--firmware/target/mips/ingenic_x1000/app.lds8
-rw-r--r--firmware/target/mips/ingenic_x1000/crt0.S2
-rw-r--r--firmware/target/mips/ingenic_x1000/spl-start.S2
-rw-r--r--firmware/target/mips/ingenic_x1000/spl.lds2
4 files changed, 9 insertions, 5 deletions
diff --git a/firmware/target/mips/ingenic_x1000/app.lds b/firmware/target/mips/ingenic_x1000/app.lds
index 5b43f9576e..270055c18f 100644
--- a/firmware/target/mips/ingenic_x1000/app.lds
+++ b/firmware/target/mips/ingenic_x1000/app.lds
@@ -30,11 +30,15 @@ MEMORY
SECTIONS
{
- .text :
+ .startup :
{
loadaddress = .;
_loadaddress = .;
- *(.init.text);
+ *(.startup.text);
+ } > DRAM
+
+ .text :
+ {
*(.text*);
} > DRAM
diff --git a/firmware/target/mips/ingenic_x1000/crt0.S b/firmware/target/mips/ingenic_x1000/crt0.S
index ad2719474b..494f3722aa 100644
--- a/firmware/target/mips/ingenic_x1000/crt0.S
+++ b/firmware/target/mips/ingenic_x1000/crt0.S
@@ -34,7 +34,7 @@
.set noreorder
.set noat
- .section .init.text
+ .section .startup.text,"ax",%progbits
_start:
b _realstart
diff --git a/firmware/target/mips/ingenic_x1000/spl-start.S b/firmware/target/mips/ingenic_x1000/spl-start.S
index 58346fe750..ecdc47f283 100644
--- a/firmware/target/mips/ingenic_x1000/spl-start.S
+++ b/firmware/target/mips/ingenic_x1000/spl-start.S
@@ -31,7 +31,7 @@
.set noreorder
.set noat
- .section .init.spl
+ .section .startup.spl
_spl_start:
/* Clear data watchpoint */
diff --git a/firmware/target/mips/ingenic_x1000/spl.lds b/firmware/target/mips/ingenic_x1000/spl.lds
index 09ab75d520..b6c982bd80 100644
--- a/firmware/target/mips/ingenic_x1000/spl.lds
+++ b/firmware/target/mips/ingenic_x1000/spl.lds
@@ -15,7 +15,7 @@ SECTIONS
{
.text :
{
- *(.init.spl);
+ *(.startup.spl);
*(.text*);
*(.icode*);
} > TCSM