Hello I have written my own kernel loader, but I am having problems to setup the right gnu ld script. I want my program that way:
.text VMA(0x00000000) LMA(0x00100000)
.rodata (just behind .text and vma & lma aligned to size)
.data (just behind .rodata and vma & lma aligned to size)
.bss (just behind .data and vma & lma aligned to size)
As soon as I am home I will post my linker script.
linker script for elf64 kernel
- dchapiesky
- Member
- Posts: 204
- Joined: Sun Dec 25, 2016 1:54 am
- Libera.chat IRC: dchapiesky
Re: linker script for elf64 kernel
Are you using an elf loader or objcopy'ing to a binary?
see http://wiki.osdev.org/Linker_Scripts
but know that binary format (i.e. no elf loader - just load in memory and jmp) ignores ENTRY()... you must make sure your startup code in at the address you want....
see http://wiki.osdev.org/Linker_Scripts
but know that binary format (i.e. no elf loader - just load in memory and jmp) ignores ENTRY()... you must make sure your startup code in at the address you want....
Plagiarize. Plagiarize. Let not one line escape thine eyes...