private boolean requiresGotEntry(ElfRelocation r) {

		X86_64_ElfRelocationType type = handler.getRelocationType(r.getType());
		if (type == null) {
			return false;
		}

		switch (type) {
			case R_X86_64_GOTPCREL:
//			case R_X86_64_GOTOFF64:
//			case R_X86_64_GOTPC32:
//			case R_X86_64_GOT64:
			case R_X86_64_GOTPCREL64:
//			case R_X86_64_GOTPC64:
				return true;
			case R_X86_64_GOTPCRELX:
			case R_X86_64_REX_GOTPCRELX:
				// NOTE: Relocation may not actually require GOT entry in which case %got 
				// may be over-allocated, but is required in some cases.
				return true;
			default:
				return false;
		}
	}
<code>X86_64_ElfRelocationContext</code> provides ability to generate a
Global Offset Table (GOT) to facilitate GOT related relocations encountered within 
object modules.
Ghidra/Processors/x86/src/main/java/ghidra/app/util/bin/format/elf/relocation/X86_64_ElfRelocationContext.java