Powerpc64 does not generate copy relocation for shared library variable

kamlesh kumar kamleshbhalui@gmail.com
Tue Jul 30 05:17:00 GMT 2019

Hi Alan,
I was expecting same behavior from ppc64 as on ppc32.
excerpt from

Dynamic executables, however, are generally not created from
position-independent code.
Any references to external data they make can seemingly only be achieved at
runtime by modifying the code that makes the reference.
Modifying a read-only text segment is to be avoided. The *copy* relocation
technique can solve this reference.

On Tue, Jul 30, 2019 at 9:33 AM Alan Modra <amodra@gmail.com> wrote:

> On Tue, Jul 30, 2019 at 09:22:44AM +0530, kamlesh kumar wrote:
> > which is referring to var which is defined in a shared library, while it
> > should do copy relocation.
> Why should it?  Copy relocations are a hack!  If you can do without
> them, all the better.
> --
> Alan Modra
> Australia Development Lab, IBM

More information about the Binutils mailing list