`i686-w64-mingw32-gcc` and relative data addressing (PIC)

as far as I know, Windows PE doesn't use a GOT (global offset table), and PE DLLs are not truly position "independent" in the same sense as ELF shared libraries: a PE DLL is relocated at load time if the loader cannot (or decided not to, e.g. for security reasons) put it at the target base address.

and I don't remember msvc to have a -fpic equivalent, so I did some searching and many sources seem to indicate this is the case. here's some examples:

1 Like