Allow copy relocations with pie links
Cary Coutant
ccoutant@google.com
Fri May 9 06:40:00 GMT 2014
>> What should this code do, then? Add a COPY reloc only for
>> position-dependent executables?
>
> Yes. If we're building a PIE then we should be using -fpic/PIC
> compiled code and won't have the relocs that would hit this code. If
> we do try to build a PIE with non-PIC code, then we'll get dynamic
> relocs in text. Enabling copy relocs for PIEs would still give
> us DT_TEXTREL. (Of course, ppc64 gcc is PIC by default, so the
> foregoing mostly applies to ppc32.)
OK, thanks. Sri, both locations in powerpc.cc should use the test
!output_is_position_independent(). That will leave powerpc functioning
exactly as before.
-cary
More information about the Binutils
mailing list