Created
December 28, 2015 17:04
-
-
Save smokku/c0b64ec60c95736df7e1 to your computer and use it in GitHub Desktop.
ELF .init_array example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void my_cool_main(int argc, char* argv[], char* envp[]) | |
{ | |
// your code goes here | |
} | |
__attribute__((section(".init_array"))) void (* p_my_cool_main)(int,char*[],char*[]) = &my_cool_main; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment