public static byte[] getImageBaseOffsets32Bytes(Program program, int alignment,
			Address toAddress) {

		Address imageBase = program.getImageBase();

		long offsetValue = toAddress.subtract(imageBase);
		int offsetSize = 4; // 32 bit offset
		byte[] bytes = new byte[offsetSize];
		for (int i = 0; i < offsetSize; i++) {
			bytes[i] = (byte) offsetValue;
			offsetValue >>= 8; // Shift by a single byte.
		}

		return bytes;
	}
returns shifted address bytes if they are different than un-shifted

@param program program
@param toAddress target address
@return shifted bytes, null if same as un-shifted
Ghidra/Features/Base/src/main/java/ghidra/program/util/ProgramMemoryUtil.java