Let\'s say I have included a binary into my program during compilation so, I keep it in a variable something like
var myExec =[]byte{\'s\',\'o\',\'m\',\'e\',\' \',\'b\
In C and assuming Linux, you can change the protection of a memory region by means of the mprotect() system call, so that it can be executed (i.e.: turn a data region into a code region). After that, you could execute that region of memory by jumping into it.