This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR target/65248: [5 Regression] Copy relocation in PIE against protected symbol
- From: Alan Modra <amodra at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Sandra Loosemore <sandra at codesourcery dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Uros Bizjak <ubizjak at gmail dot com>
- Date: Mon, 2 Mar 2015 18:00:28 +1030
- Subject: Re: [PATCH] PR target/65248: [5 Regression] Copy relocation in PIE against protected symbol
- Authentication-results: sourceware.org; auth=none
- References: <20150228164223 dot GA22402 at gmail dot com> <54F26B0C dot 3020104 at codesourcery dot com> <CAMe9rOpCzX5fzKduoezC-mOxd=zo=B=NnLOuLWLC-9nv+DZ7Ng at mail dot gmail dot com>
On Sun, Mar 01, 2015 at 07:33:14AM -0800, H.J. Lu wrote:
> +mcopyreloc-in-pie
I'm not calling for a change in the name of the option (*), but
technically it isn't completely correct to call your optimisation
"copy reloc in pie". What you are really doing is using a linker
generated variable (in .dynbss of an executable), in place of a
variable definition in a shared library. Not all such variables use
copy relocs! So it is quite possible for your optimisation to trigger
but there be no sign of an R_<machine>_COPY relocation in the final
executable.
I do think your documentation should be talking about .dynbss copies
of variables rather than copy relocations, which are just a way of
initializing such variables.
*) I should have fixed the name of the linker option added here:
https://sourceware.org/ml/binutils/2001-09/msg00506.html
--
Alan Modra
Australia Development Lab, IBM