diff --git a/sys/arm64/kernel.lds b/sys/arm64/kernel.lds index d2064a0..797f75e 100644 --- a/sys/arm64/kernel.lds +++ b/sys/arm64/kernel.lds @@ -4,6 +4,16 @@ OUTPUT_ARCH(arm:arm64) ENTRY(_start) + +PHDRS +{ + headers PT_PHDR PHDRS AT(0x00400040); + headers PT_LOAD FILEHDR PHDRS AT(0x00400000); + text PT_LOAD; + rodata PT_LOAD; + data PT_LOAD; +} + SECTIONS { /* Read-only sections, merged into text segment: */ @@ -19,7 +29,7 @@ SECTIONS *(.text.hot .text.hot.*) /* .gnu.warning sections are handled specially by elf32.em. */ *(.gnu.warning) - } + } :text .plt : { *(.plt) *(.iplt) } .init : { @@ -32,7 +42,7 @@ SECTIONS PROVIDE (__etext = .); PROVIDE (_etext = .); PROVIDE (etext = .); - .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } + .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } :rodata .rodata1 : { *(.rodata1) } .interp : { *(.interp) } .note.gnu.build-id : { *(.note.gnu.build-id) } @@ -141,7 +151,7 @@ SECTIONS { *(.data .data.* .gnu.linkonce.d.*) SORT(CONSTRUCTORS) - } + } :data .data1 : { *(.data1) } /* Kernel Debugger */ .kdbgcmd ALIGN(CONSTANT(COMMONPAGESIZE)) :