Consider this function:
void foo(){
//do something
}
In assembly it would look something like this (not accurate):
push
I found a neat workaround:
Define the function in assembly but call a extern c function:
bits 32
global _bar
extern _foo
section .data
section .text
_bar:
call _foo
iret
in C:
void foo(){
//do your stuff here
}
extern void bar();
//bar is now your "naked" function
compiled with nasm and gcc under windows