private Address allocateGot() {

		if (allocatedGotAddress != null) {
			if (allocatedGotAddress == Address.NO_ADDRESS) {
				return null;
			}
			return allocatedGotAddress;
		}

		allocatedGotAddress = Address.NO_ADDRESS;
		nextAllocatedGotEntryAddress = Address.NO_ADDRESS;

		ElfSymbol gotElfSymbol = findGotElfSymbol();

		if (gotElfSymbol == null && !getElfHeader().isRelocatable()) {
			loadHelper
					.log("GOT allocatiom failed. " + ElfConstants.GOT_SYMBOL_NAME + " not defined");
			return null;
		}

		if (gotElfSymbol != null && gotElfSymbol.getValue() != 0) {
			loadHelper
					.log("GOT allocatiom failed. " + ElfConstants.GOT_SYMBOL_NAME + " already defined");
			return null;
		}

		int alignment = getLoadAdapter().getLinkageBlockAlignment();
		int gotSize = computeRequiredGotSize();
		allocatedGotLimits = getLoadHelper().allocateLinkageBlock(alignment, gotSize,
			ElfRelocationHandler.GOT_BLOCK_NAME);
		if (allocatedGotLimits != null &&
			allocatedGotLimits.getMinAddress().getOffset() < Integer.MAX_VALUE) {
			// NOTE: GOT must fall within first 32-bit segment
			if (gotElfSymbol != null) {
				// remember where GOT was allocated
				try {
					loadHelper.createSymbol(allocatedGotLimits.getMinAddress(),
						ElfConstants.GOT_SYMBOL_NAME, true, false, null);
				}
				catch (InvalidInputException e) {
					throw new AssertionError("Unexpected exception", e);
				}
				symbolMap.put(gotElfSymbol, allocatedGotLimits.getMinAddress());
			}
			allocatedGotAddress = allocatedGotLimits.getMinAddress();
			nextAllocatedGotEntryAddress = allocatedGotAddress;
			gotMap = new HashMap<>();
			loadHelper.log("Created " + ElfRelocationHandler.GOT_BLOCK_NAME +
				" block required for GOT relocation processing");
			return allocatedGotAddress;
		}

		loadHelper.log("Failed to allocate GOT block required for relocation processing");
		return null;
	}
<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