protected long relocateSegment(long firstValidAddress, int alignOverride) throws OmfException {
		int align = getAlignment();
		if (alignOverride >= 0) {
			align = alignOverride;
		}
		switch (align) {
			case 0:			// Absolute segment, not relocatable
				throw new OmfException("Trying to relocate an absolute segment");
			case 1:			// Byte aligned
				break;		// Keep the first valid address
			case 2:			// 2-byte aligned
				firstValidAddress = (firstValidAddress + 1) & 0xfffffffffffffffeL;
				break;
			case 3:			// 16-byte aligned
				firstValidAddress = (firstValidAddress + 15) & 0xfffffffffffffff0L;
				break;
			case 4:			// "page" aligned,  assume 4096
				firstValidAddress = (firstValidAddress + 4095) & 0xfffffffffffff000L;
				break;
			case 5:			// 4-byte aligned
				firstValidAddress = (firstValidAddress + 3) & 0xfffffffffffffffcL;
				break;
			default:
				throw new OmfException("Unsupported alignment type");
		}
		vma = firstValidAddress;
		firstValidAddress = vma + segmentLength.value();
		return firstValidAddress;
	}
Given the first possible address where this segment can reside, relocate the
segment based on this address and alignment considerations.
@param firstValidAddress is the first possible Address for the segment
@param alignOverride if non-negative, overrides alignment info from the segment header
@return the next possible address for following segments
@throws OmfException for bad alignment information
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/omf/omf/OmfSegmentHeader.java