Re: [PATCH] PR target/65248: [5 Regression] Copy relocation in PIE against protected symbol

2015-03-04 Thread H.J. Lu
On Tue, Mar 3, 2015 at 7:13 PM, Alan Modra amo...@gmail.com wrote: On Tue, Mar 03, 2015 at 06:20:05AM -0800, H.J. Lu wrote: For x86-64, protected data symbols are impossible. Impossible? This is not even true currently since -fPIC emits code that looks like it would fully support protected

Re: [PATCH] PR target/65248: [5 Regression] Copy relocation in PIE against protected symbol

2015-03-03 Thread Alan Modra
On Mon, Mar 02, 2015 at 05:36:24AM -0800, H.J. Lu wrote: On Sun, Mar 1, 2015 at 11:48 PM, Uros Bizjak ubiz...@gmail.com wrote: On Sat, Feb 28, 2015 at 5:42 PM, H.J. Lu hjl.to...@gmail.com wrote: Ue copy relocation in PIE improves performance. But copy relocation can't be used to access

Re: [PATCH] PR target/65248: [5 Regression] Copy relocation in PIE against protected symbol

2015-03-03 Thread Alan Modra
On Tue, Mar 03, 2015 at 06:20:05AM -0800, H.J. Lu wrote: For x86-64, protected data symbols are impossible. Impossible? This is not even true currently since -fPIC emits code that looks like it would fully support protected visibiliy variables in shared libraries. If you meant to say it is

Re: [PATCH] PR target/65248: [5 Regression] Copy relocation in PIE against protected symbol

2015-03-03 Thread H.J. Lu
On Tue, Mar 3, 2015 at 12:12 AM, Alan Modra amo...@gmail.com wrote: On Mon, Mar 02, 2015 at 05:36:24AM -0800, H.J. Lu wrote: On Sun, Mar 1, 2015 at 11:48 PM, Uros Bizjak ubiz...@gmail.com wrote: On Sat, Feb 28, 2015 at 5:42 PM, H.J. Lu hjl.to...@gmail.com wrote: Ue copy relocation in PIE

Re: [PATCH] PR target/65248: [5 Regression] Copy relocation in PIE against protected symbol

2015-03-02 Thread Richard Biener
On Sat, Feb 28, 2015 at 5:42 PM, H.J. Lu hjl.to...@gmail.com wrote: Ue copy relocation in PIE improves performance. But copy relocation can't be used to access protected symbols defined in shared libaries and linker in binutils 2.26 enforces doesn't allow it. GCC doesn't know if an external

Re: [PATCH] PR target/65248: [5 Regression] Copy relocation in PIE against protected symbol

2015-03-02 Thread H.J. Lu
On Mon, Mar 2, 2015 at 4:05 AM, Richard Biener richard.guent...@gmail.com wrote: On Mon, Mar 2, 2015 at 11:09 AM, Alan Modra amo...@gmail.com wrote: On Mon, Mar 02, 2015 at 09:40:01AM +0100, Richard Biener wrote: On Sat, Feb 28, 2015 at 5:42 PM, H.J. Lu hjl.to...@gmail.com wrote: Ue copy

Re: [PATCH] PR target/65248: [5 Regression] Copy relocation in PIE against protected symbol

2015-03-02 Thread H.J. Lu
On Mon, Mar 2, 2015 at 5:39 AM, H.J. Lu hjl.to...@gmail.com wrote: On Mon, Mar 2, 2015 at 4:05 AM, Richard Biener richard.guent...@gmail.com wrote: On Mon, Mar 2, 2015 at 11:09 AM, Alan Modra amo...@gmail.com wrote: On Mon, Mar 02, 2015 at 09:40:01AM +0100, Richard Biener wrote: On Sat, Feb

Re: [PATCH] PR target/65248: [5 Regression] Copy relocation in PIE against protected symbol

2015-03-02 Thread Richard Biener
On Mon, Mar 2, 2015 at 11:09 AM, Alan Modra amo...@gmail.com wrote: On Mon, Mar 02, 2015 at 09:40:01AM +0100, Richard Biener wrote: On Sat, Feb 28, 2015 at 5:42 PM, H.J. Lu hjl.to...@gmail.com wrote: Ue copy relocation in PIE improves performance. But copy relocation can't be used to access

Re: [PATCH] PR target/65248: [5 Regression] Copy relocation in PIE against protected symbol

2015-03-02 Thread H.J. Lu
On Sun, Mar 1, 2015 at 11:48 PM, Uros Bizjak ubiz...@gmail.com wrote: On Sat, Feb 28, 2015 at 5:42 PM, H.J. Lu hjl.to...@gmail.com wrote: Ue copy relocation in PIE improves performance. But copy relocation can't be used to access protected symbols defined in shared libaries and linker in

Re: [PATCH] PR target/65248: [5 Regression] Copy relocation in PIE against protected symbol

2015-03-02 Thread Alan Modra
On Mon, Mar 02, 2015 at 09:40:01AM +0100, Richard Biener wrote: On Sat, Feb 28, 2015 at 5:42 PM, H.J. Lu hjl.to...@gmail.com wrote: Ue copy relocation in PIE improves performance. But copy relocation can't be used to access protected symbols defined in shared libaries and linker in

Re: [PATCH] PR target/65248: [5 Regression] Copy relocation in PIE against protected symbol

2015-03-01 Thread Alan Modra
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

Re: [PATCH] PR target/65248: [5 Regression] Copy relocation in PIE against protected symbol

2015-03-01 Thread Uros Bizjak
On Sat, Feb 28, 2015 at 5:42 PM, H.J. Lu hjl.to...@gmail.com wrote: Ue copy relocation in PIE improves performance. But copy relocation can't be used to access protected symbols defined in shared libaries and linker in binutils 2.26 enforces doesn't allow it. GCC doesn't know if an external

Re: [PATCH] PR target/65248: [5 Regression] Copy relocation in PIE against protected symbol

2015-03-01 Thread H.J. Lu
On Sat, Feb 28, 2015 at 5:27 PM, Sandra Loosemore san...@codesourcery.com wrote: On 02/28/2015 09:42 AM, H.J. Lu wrote: @@ -22704,6 +22705,13 @@ For systems that use the GNU C Library, the default is on. Specify that the assembler should encode SSE instructions with VEX prefix. The

[PATCH] PR target/65248: [5 Regression] Copy relocation in PIE against protected symbol

2015-02-28 Thread H.J. Lu
Ue copy relocation in PIE improves performance. But copy relocation can't be used to access protected symbols defined in shared libaries and linker in binutils 2.26 enforces doesn't allow it. GCC doesn't know if an external definition is protected or not. This option adds -mcopyreloc-in-pie to

Re: [PATCH] PR target/65248: [5 Regression] Copy relocation in PIE against protected symbol

2015-02-28 Thread Sandra Loosemore
On 02/28/2015 09:42 AM, H.J. Lu wrote: @@ -22704,6 +22705,13 @@ For systems that use the GNU C Library, the default is on. Specify that the assembler should encode SSE instructions with VEX prefix. The option @option{-mavx} turns this on by default. +@item -mcopyreloc-in-pie +@itemx