Compiler Support - x86 pic vs pie Local global variables and functions are optimized in pie External global variables and functions are the same as pic When compiled with -fpic: ... add $0x3,%ebx R_386_GOTPC _GLOBAL_OFFSET_TABLE_ ... int x = local_global_func(); call 33 R_386_PLT32 local_global_func ... local_global_var = 0x20; mov 0x0(%ebx),%eax R_386_GOT32 local_global_var movl $0x20,(%eax) When compiled with -fpie: ... add $0x3,%ebx R_386_GOTPC _GLOBAL_OFFSET_TABLE_ ... int x = local_global_func(); call 33 R_386_PC32 local_global_func ... local_global_var = 0x20; movl $0x20,0x0(%ebx) R_386_GOTOFF local_global_var