This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ppc relocs

I have checked in various changes and both TLS and non-TLS builds on PPC32
pass make check for me.  I have made some changes to PPC64 code too, but
not tested that.

I spent a while trying to figure out the right thing for the 16-bit relocs,
and then punted.  I think these relocs are not produced in PIC code linked
with ld -shared.  Is that right?  Does the PPC32 or PPC64 ABI permit
non-PIC code in shared libraries?  If not, then we don't need to handle these.

If that's the case I am confused by the 16-bit reloc handling in
powerpc64/dl-machine.h.  Firstly, does it really need to be there at all?
For the *_DS and *_LO_DS relocs, the calculations also don't jibe with what
I see in PPC-elf64abi.txt.  The document shows the calculations "(S + A) >>
2" and "#lo(S + A) >> 2".  I take this to mean that the symbol value plus
addend should be shifted right two bits before being stored at the r_offset
address.  Otherwise it would be the same as the non-_DS variants.  But
powerpc64/dl-machine.h treats them the same except for the error checking.
Is that really supposed to be the only difference between
e.g. R_PPC64_ADDR16 and R_PPC64_ADDR16_DS?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]