Back to index

glibc  2.9
init-first.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <sysdep.h>
#include <fpu_control.h>
#include <sys/param.h>
#include <sys/types.h>
#include <libc-internal.h>
#include <ldsodefs.h>
#include "dl-osinfo.h"

Go to the source code of this file.


void __libc_init (int, char **, char **)
static void init (int, char **, char **)
void __libc_init_first (int argc, char **argv, char **envp)

Function Documentation

void __libc_init ( int  ,
char **  ,
char **   
void __libc_init_first ( int  argc,
char **  argv,
char **  envp 

Definition at line 99 of file init-first.c.

  init (argc, argv, envp);
static void init ( int  ,
char **  ,
char **   
) [static]

Definition at line 38 of file init-first.c.

  extern void __getopt_clean_environment (char **);
  /* The next variable is only here to work around a bug in gcc <=
     If the address would be taken inside the expression the optimizer
     would try to be too smart and throws it away.  Grrr.  */

  /* XXX disable dl for now
  __libc_multiple_libcs = &_dl_starting_up && !_dl_starting_up; */

  /* Save the command-line arguments.  */
  __libc_argc = argc;
  __libc_argv = argv;
  __environ = envp;

#ifndef SHARED
  __libc_init_secure ();

  __libc_init (argc, argv, envp);

  /* This is a hack to make the special getopt in GNU libc working.  */
  __getopt_clean_environment (envp);

#ifdef SHARED
  __libc_global_ctors ();

Here is the call graph for this function: