summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2021-04-25 16:17:33 +0100
committerAidan MacDonald <amachronic@protonmail.com>2021-04-26 12:41:06 +0000
commitd5695822a7d2f04aad43f751ea427718a5d7257e (patch)
tree54c94ead6eb2ff39dc673003dcf8f6d60411698e
parent7d0d32dbc65a8332a49aeed3a97e24cb109958b2 (diff)
downloadrockbox-d5695822a7.tar.gz
rockbox-d5695822a7.tar.bz2
rockbox-d5695822a7.zip
MIPS: remove .MIPS.abiflags section
The abiflags data is only used to communicate ABI information to a program loader -- you can see what info is stored with readelf -A. Dropping it shaves 24 bytes off of every binary (including plugins). Change-Id: Iae78eeffe5c840ff67717707fb94821d24aac8ec
-rw-r--r--apps/plugins/plugin.lds1
-rw-r--r--firmware/target/mips/ingenic_jz47xx/app.lds1
-rw-r--r--firmware/target/mips/ingenic_jz47xx/boot.lds7
-rw-r--r--firmware/target/mips/ingenic_x1000/app.lds1
-rw-r--r--firmware/target/mips/ingenic_x1000/spl.lds7
5 files changed, 17 insertions, 0 deletions
diff --git a/apps/plugins/plugin.lds b/apps/plugins/plugin.lds
index 7033d023f3..5dfaa6c86b 100644
--- a/apps/plugins/plugin.lds
+++ b/apps/plugins/plugin.lds
@@ -299,6 +299,7 @@ SECTIONS
{
*(.eh_frame)
#ifdef CPU_MIPS
+ *(.MIPS.abiflags)
*(.rel.dyn)
#endif
}
diff --git a/firmware/target/mips/ingenic_jz47xx/app.lds b/firmware/target/mips/ingenic_jz47xx/app.lds
index 8177db794f..89deb63f89 100644
--- a/firmware/target/mips/ingenic_jz47xx/app.lds
+++ b/firmware/target/mips/ingenic_jz47xx/app.lds
@@ -111,6 +111,7 @@ SECTIONS
/DISCARD/ :
{
+ *(.MIPS.abiflags);
*(.eh_frame);
*(.rel.dyn);
}
diff --git a/firmware/target/mips/ingenic_jz47xx/boot.lds b/firmware/target/mips/ingenic_jz47xx/boot.lds
index 7b53272058..b5a3f51c01 100644
--- a/firmware/target/mips/ingenic_jz47xx/boot.lds
+++ b/firmware/target/mips/ingenic_jz47xx/boot.lds
@@ -91,4 +91,11 @@ SECTIONS
. += 0x400;
irqstackend = .;
} > IRAM
+
+ /DISCARD/ :
+ {
+ *(.MIPS.abiflags);
+ *(.eh_frame);
+ *(.rel.dyn);
+ }
}
diff --git a/firmware/target/mips/ingenic_x1000/app.lds b/firmware/target/mips/ingenic_x1000/app.lds
index bcfb3b28cf..48a2d8d3c5 100644
--- a/firmware/target/mips/ingenic_x1000/app.lds
+++ b/firmware/target/mips/ingenic_x1000/app.lds
@@ -113,6 +113,7 @@ SECTIONS
/DISCARD/ :
{
+ *(.MIPS.abiflags);
*(.eh_frame);
*(.rel.dyn);
}
diff --git a/firmware/target/mips/ingenic_x1000/spl.lds b/firmware/target/mips/ingenic_x1000/spl.lds
index f11fd2cf3b..39b5939a6a 100644
--- a/firmware/target/mips/ingenic_x1000/spl.lds
+++ b/firmware/target/mips/ingenic_x1000/spl.lds
@@ -57,4 +57,11 @@ SECTIONS
{
*(.sdram);
} > DRAM
+
+ /DISCARD/ :
+ {
+ *(.MIPS.abiflags);
+ *(.eh_frame);
+ *(.rel.dyn);
+ }
}