OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Nov 17, 2017 6:47 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: linker script for elf64 kernel
PostPosted: Thu Oct 27, 2016 10:24 am 
Offline
Member
Member

Joined: Wed Nov 14, 2012 4:55 pm
Posts: 103
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.


Top
 Profile  
 
 Post subject: Re: linker script for elf64 kernel
PostPosted: Wed Dec 28, 2016 8:21 pm 
Offline
Member
Member
User avatar

Joined: Sun Dec 25, 2016 1:54 am
Posts: 204
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....

_________________
Plagiarize. Plagiarize. Let not one line escape thine eyes...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group