Back to index

glibc  2.9
Functions | Variables
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>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


void __libc_init_first (int argc, char **argv, char **envp)
void _dl_start (void)


int __libc_multiple_libcs attribute_hidden = 1

Function Documentation

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

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

#ifdef SHARED
  /* For DSOs we do not need __libc_init_first but instead _init.  */

_init (int argc, char **argv, char **envp)
  extern void __getopt_clean_environment (char **);

  __libc_multiple_libcs = &_dl_starting_up && !_dl_starting_up;

  /* Make sure we don't initialize twice.  */
  if (!__libc_multiple_libcs)
      /* Set the FPU control word to the proper default value if the
        kernel would use a different value.  (In a static program we
        don't have this information.)  */
#ifdef SHARED
      if (__fpu_control != GLRO(dl_fpu_control))
       __setfpucw (__fpu_control);

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

#ifndef SHARED
  __libc_init_secure ();

  /* First the initialization which normally would be done by the
     dynamic linker.  */
  _dl_non_dynamic_init ();


  __init_misc (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 ();
void _dl_start ( void  )

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

  abort ();

Here is the call graph for this function:

Variable Documentation

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