Messages in this thread |  | | Date | Fri, 5 Oct 2018 22:02:20 -0400 | From | Steven Rostedt <> | Subject | Re: [POC][RFC][PATCH 1/2] jump_function: Addition of new feature "jump_function" |
| |
On Fri, 05 Oct 2018 21:51:11 -0400 Steven Rostedt <rostedt@goodmis.org> wrote:
> +#define arch_dynfunc_trampoline(name, def) \ > + asm volatile ( \ > + ".globl dynfunc_" #name "; \n\t" \ > + "dynfunc_" #name ": \n\t" \ > + "jmp " #def " \n\t" \ > + ".balign 8 \n \t" \ > + : : : "memory" ) > +
Note, the assembler can easily put in a two byte jump here. The .balign was suppose to also have some padding (nop) incase that happens. It's fine, because we can just replace it with a 5 byte jump, as long as we have 3 bytes afterward if it is a two byte jump.
-- Steve
|  |