Page 1 of 1

PT_DYNAMIC

Posted: Sat Jun 19, 2010 5:50 pm
by -m32
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.

Re: PT_DYNAMIC

Posted: Tue Jun 22, 2010 5:26 am
by -m32
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.

Re: PT_DYNAMIC

Posted: Tue Jun 22, 2010 10:11 am
by xyzzy
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.

Re: PT_DYNAMIC

Posted: Wed Jun 23, 2010 4:56 am
by -m32
Thanks for the confirmation.