Re: [PATCH] PRs target/65846/65886: Improve copy reloc in PIE

2015-04-25 Thread H.J. Lu
On Sat, Apr 25, 2015 at 08:46:58AM -0700, H.J. Lu wrote: > Normally, with PIE, GCC accesses globals that are extern to the module > using GOT. This is two instructions, one to get the address of the global > from GOT and the other to get the value. Examples: > > --- > extern int a_glob; > int >

[PATCH] PRs target/65846/65886: Improve copy reloc in PIE

2015-04-25 Thread H.J. Lu
Normally, with PIE, GCC accesses globals that are extern to the module using GOT. This is two instructions, one to get the address of the global from GOT and the other to get the value. Examples: --- extern int a_glob; int main () { return a_glob; } --- With PIE, the generated code accesses g