private void processModuleReferenceTable(ModuleReferenceTable mrt, SegmentTable st,
			ImportedNameTable imp, Program program, SegmentedAddressSpace space, MessageLog log,
			TaskMonitor monitor) throws IOException {

		int thunkBodySize = 4;

		ExternalManager externalManager = program.getExternalManager();
		FunctionManager functionManager = program.getFunctionManager();
		Namespace globalNamespace = program.getGlobalNamespace();

		LengthStringSet[] names = mrt.getNames();
		String[][] mod2proclist = new String[names.length][];
		int length = 0;
		for (int i = 0; i < names.length; ++i) {
			String moduleName = names[i].getString();
			String[] callnames = getCallNamesForModule(moduleName, mrt, st, imp);
			mod2proclist[i] = callnames;
			length += callnames.length * thunkBodySize;
		}
		if (length == 0) {
			return;
		}
		int segment = space.getNextOpenSegment(program.getMemory().getMaxAddress());
		Address addr = space.getAddress(segment, 0);
		String comment = "";
		String source = "";
		// This isn't a real block, just place holder addresses, so don't create an initialized block
		MemoryBlock block = MemoryBlockUtils.createUninitializedBlock(program, false,
			MemoryBlock.EXTERNAL_BLOCK_NAME, addr, length, comment, source, true, false, false,
			log);

		// Mark block as an artificial fabrication
		block.setArtificial(true);

		for (int i = 0; i < names.length; ++i) {
			String moduleName = names[i].getString();
			String[] callnames = mod2proclist[i];
			for (String callname : callnames) {
				Function refFunction = null;
				try {
					ExternalLocation loc;
					loc = externalManager.addExtFunction(moduleName, callname, null,
						SourceType.IMPORTED);
					refFunction = loc.getFunction();
				}
				catch (DuplicateNameException e) {
					log.appendMsg(e.getMessage() + '\n');
					continue;
				}
				catch (InvalidInputException e) {
					log.appendMsg(e.getMessage() + '\n');
					continue;
				}
				AddressSet body = new AddressSet();
				body.add(addr, addr.add(thunkBodySize - 1));
				try {
					functionManager.createThunkFunction(null, globalNamespace, addr, body,
						refFunction, SourceType.IMPORTED);
				}
				catch (OverlappingFunctionException e) {
					log.appendMsg(e.getMessage() + '\n');
				}
				addr = addr.addWrap(thunkBodySize);
			}
		}
	}
This method creates an artificial memory block
that will serve as a jump table for imported
libraries.
Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/NeLoader.java