OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Mar 29, 2024 7:01 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: PT_DYNAMIC
PostPosted: Sat Jun 19, 2010 5:50 pm 
Offline
Member
Member
User avatar

Joined: Thu Feb 21, 2008 5:59 am
Posts: 120
Location: Ottawa, Canada
When parsing an ELF executable that requires dynamic linking, I noticed that the PT_DYNAMIC section's p_offset, and p_vaddr values are equal to those seen in one of the PT_LOAD sections (data).

Is it always the case that the PT_DYNAMIC section will be found in one of the PT_LOAD sections obviating the need to do a separate read on the file to load the dynamic section? The ELF specification I have is not clear on that.

Thanks.


Top
 Profile  
 
 Post subject: Re: PT_DYNAMIC
PostPosted: Tue Jun 22, 2010 5:26 am 
Offline
Member
Member
User avatar

Joined: Thu Feb 21, 2008 5:59 am
Posts: 120
Location: Ottawa, Canada
I guess people aren't that familiar with this topic :)

Well, my observations indicate that yes it would always be part of one of the loaded sections/segments.


Top
 Profile  
 
 Post subject: Re: PT_DYNAMIC
PostPosted: Tue Jun 22, 2010 10:11 am 
Offline
Member
Member

Joined: Wed Jul 25, 2007 8:45 am
Posts: 391
Location: London, UK
Yes, you're right, the contents of the dynamic section are included within the LOAD sections. You don't need to load the dynamic section manually.

_________________
http://alex-smith.me.uk


Top
 Profile  
 
 Post subject: Re: PT_DYNAMIC
PostPosted: Wed Jun 23, 2010 4:56 am 
Offline
Member
Member
User avatar

Joined: Thu Feb 21, 2008 5:59 am
Posts: 120
Location: Ottawa, Canada
Thanks for the confirmation.


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: SemrushBot [Bot] and 234 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