Back to index

glibc  2.9
Defines | Functions | Variables
start.c File Reference
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>

Go to the source code of this file.

Defines

#define STACKSIZE   10

Functions

void __libc_init (int argc, char **argv, char **envp)
int main (int argc, char **argv, char **envp)
register long int sp asm ("sp")
void __start ()

Variables

int __data_start = 0

Define Documentation

#define STACKSIZE   10

Definition at line 56 of file start.c.


Function Documentation

void __libc_init ( int  argc,
char **  argv,
char **  envp 
)
void __start ( void  )

Definition at line 60 of file start.c.

{
  int argc;
  char **argv, **envp;

  /* Set up the global pointer.  */
  asm volatile ("la $28,_gp");
  argc = ((int *) sp)[STACKSIZE];
  argv = (char **) &((int *) sp)[STACKSIZE + 1];
  envp = &argv[argc + 1];
  __environ = envp;

  __libc_init (argc, argv, envp);
  errno = 0;
  exit (main (argc, argv, envp));
}

Here is the call graph for this function:

register long int sp asm ( "sp"  )
int main ( int  argc,
char **  argv,
char **  envp 
)

Variable Documentation

Definition at line 45 of file start.c.