From 7ad6a3d3b60d3bfcc1184e1dae74640e4c48ff66 Mon Sep 17 00:00:00 2001 From: numzero Date: Mon, 12 Aug 2024 00:30:19 +0300 Subject: [PATCH] Remove PHDRS ld makes those well enough when the sections are laid out suitably --- link.ld | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/link.ld b/link.ld index 99e2b10..bd5ec20 100644 --- a/link.ld +++ b/link.ld @@ -2,15 +2,9 @@ ENTRY(_start) SECTIONS { . = 4M + SIZEOF_HEADERS; - .text ALIGN(16) : { *(.text) } :text - .rodata ALIGN(16) : { *(.rodata) } :text + .text ALIGN(16) : { *(.text) } + .rodata ALIGN(16) : { *(.rodata) } . += 4K; /* put .data in the next page in memory while not actually moving it in the file */ - .data ALIGN(16) : { *(.data) } :data - .bss ALIGN(4K) : { *(COMMON) *(.bss) } :bss -} - -PHDRS { - text PT_LOAD FILEHDR PHDRS FLAGS(5); - data PT_LOAD FLAGS(6); - bss PT_LOAD; + .data ALIGN(16) : { *(.data) } + .bss ALIGN(4K) : { *(COMMON) *(.bss) } }