private void processRelocations(OptionalHeader optionalHeader, Program prog,
			TaskMonitor monitor, MessageLog log) {
		// We don't currently support relocations in PE's because we always load at the preferred
		// image base, but we'll go though them anyway and add them to the relocation table

		monitor.setMessage("[" + prog.getName() + "]: processing relocation tables...");

		DataDirectory[] dataDirectories = optionalHeader.getDataDirectories();
		if (dataDirectories.length <= OptionalHeader.IMAGE_DIRECTORY_ENTRY_BASERELOC) {
			return;
		}
		BaseRelocationDataDirectory brdd =
			(BaseRelocationDataDirectory) dataDirectories[OptionalHeader.IMAGE_DIRECTORY_ENTRY_BASERELOC];
		if (brdd == null) {
			return;
		}

		AddressSpace space = prog.getAddressFactory().getDefaultAddressSpace();
		RelocationTable relocTable = prog.getRelocationTable();

		for (BaseRelocation reloc : brdd.getBaseRelocations()) {
			if (monitor.isCancelled()) {
				return;
			}
			int baseAddr = reloc.getVirtualAddress();
			for (int i = 0; i < reloc.getCount(); ++i) {
				long addr = optionalHeader.getImageBase() + baseAddr + reloc.getOffset(i);
				relocTable.add(space.getAddress(addr), Status.SKIPPED, reloc.getType(i), null, null,
					null);
			}
		}
	}
PE loader option to control parsing CLI headers
Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/PeLoader.java