This is the mail archive of the
mailing list for the glibc project.
- From: Roland McGrath <roland at redhat dot com>
- To: libc-alpha at sources dot redhat dot com
- Cc: Alan Modra <amodra at bigpond dot net dot au>,Paul Mackerras <paulus at samba dot org>,Steven Munroe <sjmunroe at us dot ibm dot com>
- Date: Sun, 2 Mar 2003 03:56:52 -0800
- Subject: 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?