public static int write(MachoRelocation relocation, long value) throws MemoryAccessException {
		Memory mem = relocation.getProgram().getMemory();
		Address addr = relocation.getRelocationAddress();
		switch (relocation.getRelocationInfo().getLength()) {
			case 3:
				mem.setLong(addr, value);
				return 8;
			case 2:
				mem.setInt(addr, (int) value);
				return 4;
			case 1:
				mem.setShort(addr, (short) value);
				return 2;
			default:
				mem.setByte(addr, (byte) value);
				return 1;
		}
	}
Writes bytes at the given address.  The size of the write is determined by the length of the 
relocation info.

@param relocation The relocation to write
@param value The value to write
@return number of bytes written
@throws MemoryAccessException If there is a problem accessing memory during the write
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macho/relocation/MachoRelocationHandler.java