private List<AddressRange> processSectionRanges(MemorySection section,
			List<AddressRange> memoryAllocationList, TaskMonitor monitor)
			throws IOException, AddressOverflowException, CancelledException {

		long sectionByteOffset = 0;

		ObjectRangeMap<AllocatedFileSectionRange> fileLoadRangeMap = null;
		AddressSpace addressSpace = section.getPhysicalAddressSpace();
		if (addressSpace != AddressSpace.OTHER_SPACE) {
			fileLoadRangeMap = getFileLoadRangeMap(addressSpace, true);
		}

		List<AddressRange> modifiedRangeList = new ArrayList<>();

		Memory memory = program.getMemory();

		// NOTE: Allocated address ranges may refer to overlay memory address
		for (AddressRange allocatedAddrRange : memoryAllocationList) {

			monitor.checkCancelled();

			// Generate block name rangeIndex suffix if section sliced-up
			Integer rangeIndex = sectionIndexMap.get(section.sectionName);
			rangeIndex = (rangeIndex != null) ? (rangeIndex + 1) : 1;
			sectionIndexMap.put(section.sectionName, rangeIndex);
			if (rangeIndex == 1 && memoryAllocationList.size() == 1) {
				rangeIndex = -1; // prefer to omit index if only a single range
			}

			long rangeSize = allocatedAddrRange.getLength();

			if (allocatedAddrRange instanceof ProxyAddressRange) {
				modifiedRangeList.add(new AddressRangeImpl(allocatedAddrRange));
				sectionByteOffset += rangeSize;
				continue; // skip range
			}

			String blockName = getUniqueSectionChunkName(section, rangeIndex);

			Address physicalStartAddr = section.getMinPhysicalAddress().add(sectionByteOffset);

			if (section.isInitialized) {
				MemoryBlock block;
				long fileOffset = section.fileOffset + sectionByteOffset;
				Address minAddr;
				Address maxAddr;
				if (allocatedAddrRange instanceof OverlayAddressRange) {
					String comment = section.getComment();
					if (section.isLoaded()) { // assume another section took priority
						MemoryBlock priorityBlock = memory.getBlock(physicalStartAddr);
						if (priorityBlock != null) {
							comment = comment + " - displaced by " + priorityBlock.getName();
						}
					}
					block = createInitializedBlock(section.key, true, blockName, physicalStartAddr,
						fileOffset, rangeSize, comment, section.isReadable(), section.isWritable(),
						section.isExecute(), monitor);
				}
				else {
					block = createInitializedBlock(section.key, false, blockName, physicalStartAddr,
						fileOffset, rangeSize, section.getComment(), section.isReadable(),
						section.isWritable(), section.isExecute(), monitor);
				}
				if (block != null) {
					minAddr = block.getStart();
					maxAddr = block.getEnd();
					usedBlockNames.add(blockName);
					if (block.isOverlay() && minAddr.isLoadedMemoryAddress()) {
						physicalLoadedOverlaySet.add(minAddr.getPhysicalAddress(),
							maxAddr.getPhysicalAddress());
					}
				}
				else {
					// block may be null due to unexpected conflict or pruning - allow to continue
					minAddr = physicalStartAddr;
					maxAddr = physicalStartAddr.addNoWrap(rangeSize - 1);
				}
				if (fileLoadRangeMap != null) {
					long chunkFileOffset = section.getFileOffset() + sectionByteOffset;
					AllocatedFileSectionRange allocatedFileRange =
						new AllocatedFileSectionRange(section, chunkFileOffset, rangeSize, minAddr);
					fileLoadRangeMap.setObject(chunkFileOffset, chunkFileOffset + rangeSize - 1,
						allocatedFileRange);
				}
				modifiedRangeList.add(new AddressRangeImpl(minAddr, maxAddr));
			}
			else {
				if (allocatedAddrRange instanceof OverlayAddressRange) {
					// skip
				}
				else {
					createUninitializedBlock(section.key, false, blockName, physicalStartAddr,
						rangeSize,
						section.getComment(), section.isReadable(), section.isWritable(),
						section.isExecute());
				}
				modifiedRangeList.add(new AddressRangeImpl(allocatedAddrRange));
			}
			sectionByteOffset += rangeSize;
		}
		return modifiedRangeList;
	}
Complete creation of section memory block(s) based upon the provided
memoryAllocationList.
@param section section to be allocated and blocks created
@param memoryAllocationList memory allocation list.
Matching ranges allocated to other sections are identified using a ProxyAddressRange, 
memory-mapped file range conflicts are identified using an OverlayAddressRange, while
new file-mapped ranges are identified by an AddressRangeImpl.
@param monitor
@return memory address ranges corresponding to the specified section. Memory blocks
will have been created for these ranges but may be shared by other sections.  
@throws IOException
@throws AddressOverflowException
@throws CancelledException
Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/MemorySectionResolver.java