In Demystifying the Execve Shellcode is explained a way to write an execve shellcode:
#include #include unsigned char code[]
(*(void(*)())shellcode)()
==
p = (void(*)()) shellcode; (*p)();