private void processMainSymbol(ContainerHeader header, Program program,
			ImportStateCache importState, MessageLog log, TaskMonitor monitor) {
		SymbolTable symbolTable = program.getSymbolTable();

		LoaderInfoHeader loader = header.getLoader();

		int mainSectionIndex = loader.getMainSection();
		if (mainSectionIndex != -1) {
			SectionHeader mainSection = header.getSections().get(mainSectionIndex);
			MemoryBlock mainBlock = importState.getMemoryBlockForSection(mainSection);
			Address mainAddress = mainBlock.getStart().add(loader.getMainOffset());
			try {
				symbolTable.createLabel(mainAddress, PefConstants.MAIN, SourceType.IMPORTED);
			}
			catch (Exception e) {
				log.appendException(e);
			}

			if (mainSection.getSectionKind() == SectionKind.PackedData ||
				mainSection.getSectionKind() == SectionKind.UnpackedData ||
				mainSection.getSectionKind() == SectionKind.ExecutableData) {

				CreateDataCmd cmd = new CreateDataCmd(mainAddress, new PointerDataType());
				cmd.applyTo(program);

				Data data = program.getListing().getDefinedDataAt(mainAddress);
				if (data == null) {
					log.appendMsg("Unable to create data at main data structure.");
				}
				else {
					Address address = (Address) data.getValue();
					if (program.getMemory().contains(address)) {
						try {
							symbolTable.createLabel(address, "entry", SourceType.IMPORTED);
							symbolTable.createLabel(address, "main", SourceType.IMPORTED);
						}
						catch (Exception e) {
							log.appendException(e);
						}
						program.getSymbolTable().addExternalEntryPoint(address);
					}
				}
			}
		}
	}
TODO determine how to correctly identify TOC location
Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/PefLoader.java