static void writeTrampoline ( ByteBuffer buf , long target ) { // Jmp. buf . put ( ( byte ) 0xFF ) ; // ModM (RIP addressing). buf . put ( ( byte ) 0x25 ) ; // Offset (zero). buf . putInt ( 0 ) ; // Absolute address. buf . putLong ( target ) ; }
Write trampoline into code at address