aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Wild <ewild@sysmocom.de>2021-10-20 16:42:28 +0200
committerEric Wild <ewild@sysmocom.de>2021-10-20 20:03:06 +0200
commitaf6ae8b8ddb03ed821ba0f63b4c5385fc393807b (patch)
tree2602c27ff68a9260f1e3c9ab0fb96e6ea84288a6
parent90784220a5230f3f00d9d2e0855cce8869c3a6f8 (diff)
drop unused exidx sections when linking
clang might emit those even though they are neither needed or wanted, so just get rid of them. Change-Id: I159b4405cebe72af4d98b27f876c48835ffd6e2d
-rw-r--r--firmware/libboard/common/resources/sam3s4/dfu.ld9
-rw-r--r--firmware/libboard/common/resources/sam3s4/flash.ld9
2 files changed, 6 insertions, 12 deletions
diff --git a/firmware/libboard/common/resources/sam3s4/dfu.ld b/firmware/libboard/common/resources/sam3s4/dfu.ld
index a485770..db747fa 100644
--- a/firmware/libboard/common/resources/sam3s4/dfu.ld
+++ b/firmware/libboard/common/resources/sam3s4/dfu.ld
@@ -96,13 +96,10 @@ SECTIONS
_efixed = .; /* End of text section */
} > rom
- /* .ARM.exidx is sorted, so has to go in its own output section. */
- PROVIDE_HIDDEN (__exidx_start = .);
- .ARM.exidx :
+ /DISCARD/ :
{
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- } > rom
- PROVIDE_HIDDEN (__exidx_end = .);
+ *(.ARM.exidx)
+ }
. = ALIGN(4);
_etext = .;
diff --git a/firmware/libboard/common/resources/sam3s4/flash.ld b/firmware/libboard/common/resources/sam3s4/flash.ld
index f5cdbfd..50631c6 100644
--- a/firmware/libboard/common/resources/sam3s4/flash.ld
+++ b/firmware/libboard/common/resources/sam3s4/flash.ld
@@ -94,13 +94,10 @@ SECTIONS
_efixed = .; /* End of text section */
} > rom
- /* .ARM.exidx is sorted, so has to go in its own output section. */
- PROVIDE_HIDDEN (__exidx_start = .);
- .ARM.exidx :
+ /DISCARD/ :
{
- *(.ARM.exidx* .gnu.linkonce.armexidx.*)
- } > rom
- PROVIDE_HIDDEN (__exidx_end = .);
+ *(.ARM.exidx)
+ }
. = ALIGN(4);
_etext = .;