Make data sections not executable

This commit is contained in:
2025-07-25 23:44:33 +02:00
parent 51ea7ee453
commit 98010a17e3
3 changed files with 125 additions and 51 deletions

View File

@@ -12,7 +12,9 @@ SECTIONS {
KEEP(*(.text.boot));
*(.text .text.*);
} :text
PROVIDE(estart = .);
. = ALIGN(CONSTANT(MAXPAGESIZE));
PROVIDE(etext = .);
.rodata : ALIGN(16) {
*(.rodata .rodata.*);
@@ -30,4 +32,8 @@ SECTIONS {
. = ALIGN(CONSTANT(MAXPAGESIZE));
PROVIDE(end = .);
/DISCARD/ : {
*(.eh_frame)
}
}