protected Address setupHeaderAddr(Collection<SegmentCommand> segments)
			throws AddressOverflowException {
		Address headerAddr = null;
		long lowestFileOffset = Long.MAX_VALUE;

		// Check to see if the header resides in an existing segment.  If it does, we know its
		// address and we are done.  Keep track of the lowest file offset for later use.
		for (SegmentCommand segment : segments) {
			if (segment.getFileOffset() == 0 && segment.getFileSize() == 0) {
				// Don't consider empty segments (seen in .dSYM/DWARF files)
				continue;
			}
			if (segment.getFileOffset() == 0) {
				return space.getAddress(segment.getVMaddress());
			}
			lowestFileOffset = Math.min(lowestFileOffset, segment.getFileOffset());
		}

		// The header did not live in a defined segment.  Create a memory region in the OTHER space 
		// and copy the header there.
		headerAddr = AddressSpace.OTHER_SPACE.getAddress(0);
		MemoryBlock headerBlock = MemoryBlockUtils.createInitializedBlock(program, true, "HEADER",
			headerAddr, fileBytes, 0, lowestFileOffset, "Header", "", false, false, false, log);
		return headerBlock.getStart();
	}
Sets up the {@link MachHeader} in memory and returns its address.  If the header was not 
intended to reside in memory (like for Mach-O object files), then this method will create an
area in the "OTHER" address space for the header to live in.

@param segments A {@link Collection} of {@link SegmentCommand Mach-O segments}
@return The {@link Address} of {@link MachHeader} in memory
@throws AddressOverflowException if the address lies outside the address space
Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/MachoProgramBuilder.java