https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119386
--- Comment #2 from Ard Biesheuvel <ardb at kernel dot org> --- Note that the GCC man page is pretty clear about this: -mdirect-extern-access -mno-direct-extern-access Do not use or use GOT to access external symbols. The default is -mno-direct-extern-access: GOT is used for external symbols with default visibility, but not used for other external symbols. With -mdirect-extern-access, GOT is not used and all external symbols are PC-relatively addressed. It is only suitable for environments where no dynamic link is performed, like firmwares, OS kernels, executables linked with -static or -static-pie. -mdirect-extern-access is not compatible with -fPIC or -fpic.