This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Allow copy relocations with pie links
- From: Alan Modra <amodra at gmail dot com>
- To: Cary Coutant <ccoutant at google dot com>
- Cc: Sriraman Tallam <tmsriram at google dot com>, David Miller <davem at davemloft dot net>, walt at tilera dot com, Doug Kwan <dougkwan at google dot com>, binutils <binutils at sourceware dot org>, Ian Lance Taylor <iant at google dot com>, David Li <davidxl at google dot com>
- Date: Fri, 9 May 2014 08:46:03 +0930
- Subject: Re: Allow copy relocations with pie links
- Authentication-results: sourceware.org; auth=none
- References: <CAAs8HmxwPuH7_s1yLxeW_6qkMCB+_kYSzB6yYG85QZS6yVHpZg at mail dot gmail dot com> <CAHACq4q9qP_h=PuwhJkE6KMt_xf6_Ne3unGRdQpvFqaXL=OxPw at mail dot gmail dot com> <CAAs8HmxkGVYAyq4wf1FChqowmQRTO9POve8Ve5f4kb3DXPfywQ at mail dot gmail dot com> <CAHACq4qx-C-W06-2oYtHz6uVuF3WHyFfp7AO9epk84Y9_6PLOA at mail dot gmail dot com>
On Thu, May 08, 2014 at 12:27:58PM -0700, Cary Coutant wrote:
> > All changes done and new patch attached. Tested *only* for x86_64.
> > Appreciate help in testing other targets.
>
> I ran the i386 tests. David, Alan, Walt, and Doug, can you help test
> this patch on your respective targets?
The change isn't appropriate for powerpc. We don't have pc-relative
addressing modes, so must use the GOT in PIEs.
> > * symtab.h (may_need_copy_reloc): Remove check for position independent
> > code.
> > * x86_64.cc (Target_x86_64<size>::Scan::global): Add check for no
> > position independence before pc absolute may_need_copy_reloc call.
> > Add check for executable output befor pc relative may_need_copy_reloc
> > call.
> > * i386.cc: Ditto.
> > * arm.cc: Ditto.
> > * sparc.cc: Ditto.
> > * powerpc.cc: Ditto.
> > * tilegx.cc: Ditto.
> > * testsuite/pie_copyrelocs_test.cc: New file.
> > * testsuite/pie_copyrelocs_shared_test.cc: New file.
> > * Makefile.am (pie_copyrelocs_test): New test.
> > * Makefile.in: Regenerate.
--
Alan Modra
Australia Development Lab, IBM