Skip to content

Instantly share code, notes, and snippets.

@blaquee
Created October 19, 2015 16:38
Show Gist options
  • Select an option

  • Save blaquee/8813daa877148b5f2705 to your computer and use it in GitHub Desktop.

Select an option

Save blaquee/8813daa877148b5f2705 to your computer and use it in GitHub Desktop.
void
__libc_csu_init (int argc, char **argv, char **envp)
{
/* For dynamically linked executables the preinit array is executed by
the dynamic linker (before initializing any shared object). */
#ifndef LIBC_NONSHARED
/* For static executables, preinit happens right before init. */
{
const size_t size = __preinit_array_end - __preinit_array_start;
size_t i;
for (i = 0; i < size; i++)
(*__preinit_array_start [i]) (argc, argv, envp);
}
#endif
#ifndef NO_INITFINI
_init ();
#endif
const size_t size = __init_array_end - __init_array_start;
for (size_t i = 0; i < size; i++)
(*__init_array_start [i]) (argc, argv, envp);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment