Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //unsigned long kallsyms_lookup_name(const char *name)
- static unsigned long __attribute__((naked)) call_kallsyms_lookup_name(const char *name)
- {
- //this is to ensure that r4 is used
- register unsigned long* dest asm ("r4");
- asm volatile("ldr r4,=%[dest]" : : [dest] "X" (&kallsyms_lookup_name_address) : "r4");
- //just change the pc value to the address, so it returns to previous caller
- asm volatile("mov pc, r4");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement