@Override
	public void load(ByteProvider provider, LoadSpec loadSpec, List<Option> options, Program prog,
			TaskMonitor monitor, MessageLog log) throws IOException {

		if (!prog.getExecutableFormat().equals(PeLoader.PE_NAME)) {
			throw new IOException("Program must be a " + PeLoader.PE_NAME);
		}

		SymbolTable symtab = prog.getSymbolTable();
		Consumer<String> errorConsumer = err -> log.appendMsg("DefLoader", err);
		for (DefExportLine def : parseExports(provider)) {
			Integer ordinal = def.getOrdinal();
			if (ordinal == null) {
				continue;
			}
			Symbol symbol = SymbolUtilities.getLabelOrFunctionSymbol(prog,
				SymbolUtilities.ORDINAL_PREFIX + ordinal, errorConsumer);
			if (symbol == null) {
				continue;
			}
			try {
				Symbol label =
					symtab.createLabel(symbol.getAddress(), def.getName(), SourceType.IMPORTED);
				label.setPrimary();
			}
			catch (InvalidInputException e) {
				log.appendMsg(e.getMessage());
			}
		}
	}
A {@link Loader} for processing Microsoft DEF files.
Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/DefLoader.java