OSDev.org

The Place to Start for Operating System Developers
It is currently Sat May 11, 2024 11:48 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Section header offset not correct in grub?
PostPosted: Thu Oct 27, 2011 3:09 pm 
Offline
Member
Member
User avatar

Joined: Thu Jul 26, 2007 1:53 am
Posts: 395
I tried searching the forum but couldn't find an answer.

I've written a parser that parses the multiboot header for elf information. I've managed to get the elf section headers and they seem fine. My problem is that in the section header for .strtab and .symtab there is an offset that should tell me where in memory the string table and symbol table should be but this does not seem to be correct.

1. Does grub not load the content these offsets are pointing to? (i.e. the string and symbol table?)
2. The offset is supposed to be from the elf main header but grub only gives me section headers so how do I know what to base the offset from?

_________________
Fudge - Simplicity, clarity and speed.
http://github.com/Jezze/fudge/


Top
 Profile  
 
 Post subject: Re: Section header offset not correct in grub?
PostPosted: Thu Oct 27, 2011 4:52 pm 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 3:45 am
Posts: 9301
Location: On the balcony, where I can actually keep 1½m distance
An ELF loader will not load sections that haven't been marked as such. On a typical application run, the relocations, symbols, and debugging info has absolutely no need to be visible to the application, and hence does not get marked as needed in memory.

_________________
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]


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: Bing [Bot], Majestic-12 [Bot] and 20 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