From ac37da5ef502ea3d248cda3d93796743eab65783 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sun, 8 Jun 2025 23:54:24 -0400 Subject: usr: Discard .eh_frame and .note sections - Add DISCARD section in user linker scripts to remove stupid compiler generated sections we have no use for and may cause problems. Signed-off-by: Ian Moffett --- usr.bin/link.ld | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'usr.bin/link.ld') diff --git a/usr.bin/link.ld b/usr.bin/link.ld index 9fad881..5e99291 100644 --- a/usr.bin/link.ld +++ b/usr.bin/link.ld @@ -23,4 +23,9 @@ SECTIONS *(.bss.*) __bss_end = .; } + + /DISCARD/ : { + *(.eh_frame) + *(.note .note.*) + } } -- cgit v1.2.3