From af6ae8b8ddb03ed821ba0f63b4c5385fc393807b Mon Sep 17 00:00:00 2001 From: Eric Wild Date: Wed, 20 Oct 2021 16:42:28 +0200 Subject: [PATCH] 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 --- firmware/libboard/common/resources/sam3s4/dfu.ld | 9 +++------ firmware/libboard/common/resources/sam3s4/flash.ld | 9 +++------ 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 a485770f..db747fad 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 f5cdbfda..50631c61 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 = .;