diff --git a/core/embed/firmware/memory_1.ld b/core/embed/firmware/memory_1.ld index abd745fd90..b4bb47f015 100644 --- a/core/embed/firmware/memory_1.ld +++ b/core/embed/firmware/memory_1.ld @@ -26,8 +26,7 @@ sram_end = ORIGIN(SRAM) + LENGTH(SRAM); _ram_start = sram_start; _ram_end = sram_end; -/* .ARM.exidx.text.__aeabi_ui2f is probably not needed as long as we are using panic = "abort" */ -_codelen = SIZEOF(.flash) + SIZEOF(.data) + SIZEOF(.ARM.exidx) + SIZEOF(.ARM.exidx.text.__aeabi_ui2f); +_codelen = SIZEOF(.flash) + SIZEOF(.data) + SIZEOF(.exidx); _flash_start = ORIGIN(FLASH); _flash_end = ORIGIN(FLASH) + LENGTH(FLASH); _heap_start = ADDR(.heap); @@ -47,6 +46,12 @@ SECTIONS { . = ALIGN(512); } >FLASH AT>FLASH + /* exception handling info generated by llvm which should consist of 8 bytes of "cantunwind" */ + .exidx : ALIGN(4) { + *(.ARM.exidx*); + . = ALIGN(4); + } >FLASH AT>FLASH + .data : ALIGN(4) { *(.data*); . = ALIGN(512); diff --git a/core/embed/firmware/memory_1_min.ld b/core/embed/firmware/memory_1_min.ld index 0a8ec38ac8..b4bb47f015 100644 --- a/core/embed/firmware/memory_1_min.ld +++ b/core/embed/firmware/memory_1_min.ld @@ -26,8 +26,7 @@ sram_end = ORIGIN(SRAM) + LENGTH(SRAM); _ram_start = sram_start; _ram_end = sram_end; -/* .ARM.exidx.text.__aeabi_ui2f is probably not needed as long as we are using panic = "abort" */ -_codelen = SIZEOF(.flash) + SIZEOF(.data) + SIZEOF(.ARM.exidx.text.__aeabi_ui2f); +_codelen = SIZEOF(.flash) + SIZEOF(.data) + SIZEOF(.exidx); _flash_start = ORIGIN(FLASH); _flash_end = ORIGIN(FLASH) + LENGTH(FLASH); _heap_start = ADDR(.heap); @@ -47,6 +46,12 @@ SECTIONS { . = ALIGN(512); } >FLASH AT>FLASH + /* exception handling info generated by llvm which should consist of 8 bytes of "cantunwind" */ + .exidx : ALIGN(4) { + *(.ARM.exidx*); + . = ALIGN(4); + } >FLASH AT>FLASH + .data : ALIGN(4) { *(.data*); . = ALIGN(512);