This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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]

Re: Allow copy relocations with pie links


On Thu, May 8, 2014 at 11:40 PM, Cary Coutant <ccoutant@google.com> wrote:
>>> 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.

Changed and patch attached.

Thanks
Sri

>
> -cary

Attachment: gold_pie_patch.txt
Description: Text document


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