public static AddressSet getOverlayAddresses(Program program) {
		AddressSet addrSet = new AddressSet();
		MemoryBlock[] memBlocks = program.getMemory().getBlocks();
		for (MemoryBlock memoryBlock : memBlocks) {
			if (memoryBlock.isOverlay()) {
				AddressRange addressRange =
					new AddressRangeImpl(memoryBlock.getStart(), memoryBlock.getEnd());
				addrSet.add(addressRange);
			}
		}
		return addrSet;
	}
Gets an address set with the overlay addresses that are in the specified program.
@param program the program
@return the overlay addresses within the specified program.
Ghidra/Features/Base/src/main/java/ghidra/program/util/ProgramMemoryUtil.java