#include <stdlib.h>

#include <nllibc.h>

unsigned long __stack_chk_guard = 0xabadface;

#if defined(__FreeBSD__)
void _init_tls(void)
{
  return;
}
#endif

#if defined(__linux__)
int __libc_start_main(int (*main)(int argc, char *argv[], char *envp[]),
		      int argc, char *argv[])
{
  exit(main(argc, argv, &argv[argc + 1]));
  return 0;
}

void __libc_csu_init(int argc, char *argv[], char *envp[])
{
  return;
}

void __libc_csu_fini(void)
{
  return;
}
#endif

#if defined(__arm__)
/* For newlib ARM startup (See: newlib/newlib/libc/sys/arm/crt0.S) */
int initialise_monitor_handles(void)
{
  return 0;
}
#endif
