[PATCH] newlib: arm: Add .cantunwind to setjmp/longjmp

Marco Satti marcosatti@gmail.com
Mon Nov 23 15:06:35 GMT 2026


Hi,

This is a follow-up to my question from 7 Mar 2026:
https://inbox.sourceware.org/newlib/AM0P195MB0595426D0BA3C801BE734A65F77BA@AM0P195MB0595.EURP195.PROD.OUTLOOK.COM/

setjmp/longjmp currently links in the EHABI unwinder, causing
unnecessary code bloat of ~4KiB (tested on Cortex-M4).

This patch adds the .cantunwind directive to fix this, which makes it
similar to other functions (memcpy, strlen, etc).

I'm hoping someone can provide further guidance on this issue if this
is not an appropriate fix, as I am not an expert in this area.

Thanks,
Marco.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-newlib-arm-Add-.cantunwind-to-setjmp-longjmp.patch
Type: application/octet-stream
Size: 1420 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/newlib/attachments/20261123/a1af8408/attachment.obj>


More information about the Newlib mailing list