private void copyExtSymbol(Symbol extSym)
			throws InvalidInputException, OverlappingFunctionException, CodeUnitInsertionException {
		SymbolType symType = extSym.getSymbolType();
		String name = extSym.getName();
		Address addr = extSym.getAddress();
		if (symType == SymbolType.FUNCTION && extSym.getObject() instanceof Function extFunc &&
			!extFunc.isThunk()) {
			Function existingFunction = funcMgr.getFunctionAt(addr);
			if (existingFunction == null) {
				existingFunction =
					funcMgr.createFunction(name, addr, new AddressSet(addr), SourceType.IMPORTED);
			}
			else if (!name.equals(existingFunction.getName())) {
				addLabelIfNeeded(name, addr);
			}
			funcSymbolsCopied++;
		}
		else if (symType == SymbolType.LABEL && extSym.getObject() instanceof Data extData) {
			if (Undefined.isUndefined(extData.getDataType()) &&
				DataUtilities.isUndefinedRange(program, addr, addr.add(extData.getLength()))) {
				DataType undefined = Undefined.getUndefinedDataType(extData.getLength());
				DataUtilities.createData(program, addr, undefined, -1,
					ClearDataMode.CLEAR_ALL_UNDEFINED_CONFLICT_DATA);
			}
			addLabelIfNeeded(name, addr);
			dataSymbolsCopied++;
		}
		else {
			symbolsSkipped++;
		}
	}
Imports symbols from an external debug program (typically created via a reverse strip) into
the program that contains the executable code that the symbols will be applied to.
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf/ExternalDebugFileSymbolImporter.java