Remove PHDRS

ld makes those well enough when the sections are laid out suitably
This commit is contained in:
numzero 2024-08-12 00:30:19 +03:00
parent a6497217a3
commit 7ad6a3d3b6

14
link.ld
View File

@ -2,15 +2,9 @@ ENTRY(_start)
SECTIONS { SECTIONS {
. = 4M + SIZEOF_HEADERS; . = 4M + SIZEOF_HEADERS;
.text ALIGN(16) : { *(.text) } :text .text ALIGN(16) : { *(.text) }
.rodata ALIGN(16) : { *(.rodata) } :text .rodata ALIGN(16) : { *(.rodata) }
. += 4K; /* put .data in the next page in memory while not actually moving it in the file */ . += 4K; /* put .data in the next page in memory while not actually moving it in the file */
.data ALIGN(16) : { *(.data) } :data .data ALIGN(16) : { *(.data) }
.bss ALIGN(4K) : { *(COMMON) *(.bss) } :bss .bss ALIGN(4K) : { *(COMMON) *(.bss) }
}
PHDRS {
text PT_LOAD FILEHDR PHDRS FLAGS(5);
data PT_LOAD FLAGS(6);
bss PT_LOAD;
} }