OSDev.org

The Place to Start for Operating System Developers
It is currently Tue Apr 23, 2024 7:11 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: At what offset does grub load the elf file?
PostPosted: Mon Sep 30, 2019 5:52 pm 
Offline
Member
Member

Joined: Fri Apr 20, 2018 9:15 am
Posts: 35
Location: Cambridge, UK
I would like to read the debug sections from my kernel elf file and therefore need to know at what memory address grub loads the elf file so I can add it to the sections' offset. Is there a way to find out at what address the entire elf file was loaded?


Top
 Profile  
 
 Post subject: Re: At what offset does grub load the elf file?
PostPosted: Mon Sep 30, 2019 6:07 pm 
Offline
Member
Member

Joined: Wed Mar 30, 2011 12:31 am
Posts: 676
Grub does not load the entire ELF.

You need to make sure your debug sections are marked for loading when you link your ELF and possibly add some symbols around them so you can find out where they are.

_________________
toaruos on github | toaruos.org | gitlab | twitter | bim - a text editor


Top
 Profile  
 
 Post subject: Re: At what offset does grub load the elf file?
PostPosted: Mon Sep 30, 2019 6:19 pm 
Offline
Member
Member

Joined: Fri Apr 20, 2018 9:15 am
Posts: 35
Location: Cambridge, UK
klange wrote:
You need to make sure your debug sections are marked for loading when you link your ELF

How would I do so?

klange wrote:
and possibly add some symbols around them so you can find out where they are.

I tried that but ran into this issue.


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: 0xY, Bing [Bot], Google [Bot] and 113 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