On Thu, Jan 02, 2020 at 06:48:52PM +0100, Ard Biesheuvel wrote: > Currently, I am not managing to get the 64-bit compiler to emit any > GOT based references for efi_is64, though, even without the attribute, > so I am not sure what's going on there. With gcc 9, I do get R_X86_64_REX_GOTPCRELX relocations in libstub, which are then eliminated by the linker -- if they weren't they would be using addresses from the GOT. They turn into R_X86_64_PC32 with the hidden visibility.