summaryrefslogtreecommitdiff
path: root/usr.sbin/link.ld
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-06-08 23:54:24 -0400
committerIan Moffett <ian@osmora.org>2025-06-08 23:54:24 -0400
commitac37da5ef502ea3d248cda3d93796743eab65783 (patch)
treee09b4920575fac47408870acf249b974eda64286 /usr.sbin/link.ld
parentb54a16a99958228bd724c8d8ee27a0df65dcd364 (diff)
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 <ian@osmora.org>
Diffstat (limited to 'usr.sbin/link.ld')
-rw-r--r--usr.sbin/link.ld5
1 files changed, 5 insertions, 0 deletions
diff --git a/usr.sbin/link.ld b/usr.sbin/link.ld
index 9fad881..5e99291 100644
--- a/usr.sbin/link.ld
+++ b/usr.sbin/link.ld
@@ -23,4 +23,9 @@ SECTIONS
*(.bss.*)
__bss_end = .;
}
+
+ /DISCARD/ : {
+ *(.eh_frame)
+ *(.note .note.*)
+ }
}