With linker which supports copy relocation in PIE: https://sourceware.org/bugzilla/show_bug.cgi?id=18289 For extern int glob_a; int foo () { return glob_a; } compiler can optimize it from call __x86.get_pc_thunk.ax addl $_GLOBAL_OFFSET_TABLE_, %eax movl glob_a@GOT(%eax), %eax movl (%eax), %eax ret to call __x86.get_pc_thunk.ax addl $_GLOBAL_OFFSET_TABLE_, %eax movl glob_a@GOTOFF(%eax), %eax ret
A patch is posted at https://gcc.gnu.org/ml/gcc-patches/2015-04/msg01331.html
GCC 6.1 has been released.
GCC 6.3 is being released, adjusting target milestone.
GCC 6.4 is being released, adjusting target milestone.