fix RWX perms warnings in link step

This commit is contained in:
Borna Šoštarić
2025-12-31 01:39:18 +01:00
parent 5292808934
commit bd4236ad9b

View File

@@ -1,18 +1,30 @@
ENTRY(kmain) ENTRY(kmain)
PHDRS {
text PT_LOAD FLAGS(5); /* Read + Execute */
rodata PT_LOAD FLAGS(4); /* Read only */
data PT_LOAD FLAGS(6); /* Read + Write */
}
SECTIONS { SECTIONS {
. = 1M; . = 1M;
.text : { .text : {
*(.text*) *(.text*)
} } :text
.rodata : {
*(.rodata*)
} :rodata
.data : {
*(.data*)
} :data
.rodata : { *(.rodata*) }
.data : { *(.data*) }
.bss : { .bss : {
*(.bss*) *(.bss*)
*(COMMON) *(COMMON)
} } :data
.stack (NOLOAD) : { .stack (NOLOAD) : {
. = ALIGN(4); . = ALIGN(4);