This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: the question about PT_DYNAMIC's p_offset value in elf file for mips platform
- From: Thiemo Seufer <ica2_ts at csv dot ica dot uni-stuttgart dot de>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: eagle_zhou at ali dot com dot tw, binutils at sources dot redhat dot com
- Date: Tue, 26 Oct 2004 15:18:20 +0200
- Subject: Re: the question about PT_DYNAMIC's p_offset value in elf file for mips platform
- References: <OF9002F4B7.7C6D9FA7-ON48256F39.0030AC24@LocalDomain> <417E295F.9030006@redhat.com>
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