https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63793
--- Comment #18 from howarth at bromo dot med.uc.edu --- Another interesting section of code in gcc/config/i386/i386.c else { /* For TARGET_64BIT and MS_ABI, force pic on, in order to enable the use of rip-relative addressing. This eliminates fixups that would otherwise be needed if this object is to be placed in a DLL, and is essentially just as efficient as direct addressing. */ if (TARGET_64BIT_P (opts->x_ix86_isa_flags) && (TARGET_RDOS || TARGET_PECOFF)) opts->x_ix86_cmodel = CM_MEDIUM_PIC, opts->x_flag_pic = 1; else if (TARGET_64BIT_P (opts->x_ix86_isa_flags)) opts->x_ix86_cmodel = opts->x_flag_pic ? CM_SMALL_PIC : CM_SMALL; else opts->x_ix86_cmodel = CM_32; }