.got section flags on PPC
Ramana Radhakrishnan
ramana.r@gmail.com
Fri Dec 9 17:12:00 GMT 2005
Hi,
The PLT has to be executable since control is transferred through it
to the actual function being referenced in case of lazy dynamic
linking. Also on the PPC, the PLT entry is rewritten by the dynamic
linker to have the correct instruction after name resolution in case
of lazy dynamic linking.
Look at the PLT section in the Sysv4 ELF ABI doc available
http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-PPC32/index.shtml
Also the GOT has to have a blrl instruction at GOT - 4 and hence has
to be executable , look at the GOT sections in the SYSV4 reference doc
for the PPC ABI.
http://www.cloudcaptech.com/MPC555%20Resources/Programming%20Environment/SVR4abippc.pdf
As an aside look at this too :
http://sourceware.org/ml/binutils/2005-05/msg00391.html
where a change has been proposed. I am not sure about the current
status though.
HTH
cheers
Ramana
On 12/9/05, Ramon Bertran Monfort <rbertran@ac.upc.edu> wrote:
> Hello!
>
> I'm working on a binary rewriter
> for a ppc target. Now I'm using
> a mac-mini with a PPC7447A proce-
> sor. ( And binutils 2.16.1 ).
>
> And I want to know why the binutils
> set the EXECUTABLE flag to .got
> section of the ELF files? And I
> guess that set executable flag
> also to .PLT sections.
>
> I've checked the ABI for ppc, and
> says that the .got sections have
> to be setted with ALLOC and WRITE
> flags ( no EXEC flag! ).
>
> What's wrong? Any idea?
>
> Thanks in advance,
>
> Ramon.
>
--
Ramana Radhakrishnan
More information about the Binutils
mailing list