the question about PT_DYNAMIC's p_offset value in elf file for mips platform

Thiemo Seufer ica2_ts@csv.ica.uni-stuttgart.de
Tue Oct 26 13:18:00 GMT 2004


Nick Clifton wrote:
> Hi Eagle,
> 
> >I think that .dynamic section should be the first section of dynamic
> >segment.
> 
> For most ports this is true.  But for the MIPS it is not.  I will let a 
> MIPS expert explain why, as I do not actually know the reason.

I guess it is for historic reasons and/or compatibility to other
(read IRIX) operating systems.

> >If .dynamic section is not the first section in dynamic segment,
> >how can i get other dynamic section information?
> 
> If you have a section header then discovering this information is 
> simple.  Otherwise there is no easy way.  I think that with MIPS ports 
> which do not have the .dynamic section at the start of the PT_DYNAMIC 
> segment there is a requirement to keep the section header in an 
> executable.  (I expect someone will correct me on this).

Glibc's ld.so finds the offset from the magic _DYNAMIC symbol.


Thiemo



More information about the Binutils mailing list