Powerpc64 does not generate copy relocation for shared library variable
Alan Modra
amodra@gmail.com
Wed Jul 31 13:38:00 GMT 2019
On Wed, Jul 31, 2019 at 12:10:25PM +0530, Umesh Kalappa wrote:
> Agree for PPC64 and why not the same with PPC32 ?
Different ABIs. More specifically, non-PIC on ppc32 can generate
32-bit absolute addresses relatively cheaply (lis; addi), so non-PIC
on ppc32 is faster than PIC. Like ix86. And like ix86, copy
relocations are used to prevent dynamic text relocations on those
non-PIC addresses.
On ppc64 it is almost always better to load a 64-bit address from
memory rather than building it inline from a five insn sequence. That
means non-PIC on ppc64 isn't much of a win. Thus code is usually
generated as PIC.
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list