From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Thu, 15 May 2014 22:16:56 +0200 From: cinap_lenrek@felloff.net To: 9fans@9fans.net In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] linking a program to run at a high address Topicbox-Message-UUID: e68c2108-ead8-11e9-9d60-3106f5b1d025 because the immidiate to CALL instruction is 32bit which get sign extended to 64bit. but the PC *is* 64bit. its just not that easy to call directly. #include #include void jump(void *p) { ((void**)&p)[-1] = p; } void main(int argc, char *argv[]) { char code[8]; code[0] = 0xCC; /* breakpoint */ jump(code); } -- cinap