private void initValidAddressSpaces() {
		AddressSpace defaultDataSpace = program.getLanguage().getDefaultDataSpace();
		AddressSpace defaultSpace = program.getLanguage().getDefaultSpace();
		defaultSpacesAreTheSame = defaultSpace.equals(defaultDataSpace);

		AddressSpace defaultAddrSpace = program.getAddressFactory().getDefaultAddressSpace();

		// Only make reference if other reference or symbol exists
		memorySpaces = new ArrayList<>();
		for (AddressSpace space : program.getAddressFactory().getAddressSpaces()) {
			if (!space.isLoadedMemorySpace()) {
				continue;
			}

			// only default or defaultData based overlay spaces added
			if (space.isOverlaySpace()) {
				OverlayAddressSpace ovSpace = (OverlayAddressSpace) space;
				AddressSpace baseSpace = ovSpace.getPhysicalSpace();
				if (!( baseSpace.equals(defaultDataSpace) || baseSpace.equals(defaultSpace) ) ) {
					continue;
				}
			}
			else if (!( space.equals(defaultDataSpace) || space.equals(defaultSpace) ) ) {
				continue;
			}

			if (space.equals(defaultAddrSpace)) {
				memorySpaces.add(0, space); // default space is always at index 0
			}
			else {
				memorySpaces.add(space);
			}
		}
	}
Initialize address spaces to be used for a potential reference with an unknown space.
Ghidra/Features/Base/src/main/java/ghidra/program/util/SymbolicPropogator.java