Back to index

glibc  2.9
Defines | Functions
pt-initfini.c File Reference
#include <stdlib.h>

Go to the source code of this file.

Defines

#define SECTION(x)   asm (".section " x )

Functions

 asm ("\n#include \"defs.h\"")
 asm ("\n/*@HEADER_ENDS*/")
 asm ("\n/*@TESTS_BEGIN*/")
void dummy (void(*foo)(void))
 asm ("\n/*@TESTS_END*/")
 asm ("\n/*@_init_PROLOG_BEGINS*/")
static void call_initialize_minimal (void)
 SECTION (".init")
void _init (void)
 asm ("END_INIT")
 asm ("\n/*@_init_EPILOG_ENDS*/")
 asm ("\n/*@_fini_PROLOG_BEGINS*/")
 SECTION (".fini")
void _fini (void)
 asm ("END_FINI")
 asm ("\n/*@_fini_EPILOG_ENDS*/")
 asm ("\n/*@TRAILER_BEGINS*/")

Define Documentation

#define SECTION (   x)    asm (".section " x )

Definition at line 43 of file pt-initfini.c.


Function Documentation

void _fini ( void  )

Definition at line 97 of file pt-initfini.c.

{

  /* End of the _fini prolog. */
  asm ("ALIGN");
  asm ("END_FINI");
  asm ("\n/*@_fini_PROLOG_ENDS*/");

  {
    /* Let GCC know that _fini is not a leaf function by having a dummy
       function call here.  We arrange for this call to be omitted from
       either crt file.  */
    extern void i_am_not_a_leaf (void);
    i_am_not_a_leaf ();
  }

  /* Beginning of the _fini epilog. */
  asm ("\n/*@_fini_EPILOG_BEGINS*/");
  SECTION (".fini");
}

Here is the caller graph for this function:

void _init ( void  )

Definition at line 76 of file pt-initfini.c.

{
  /* The very first thing we must do is to set up the registers.  */
  call_initialize_minimal ();

  asm ("ALIGN");
  asm("END_INIT");
  /* Now the epilog. */
  asm ("\n/*@_init_PROLOG_ENDS*/");
  asm ("\n/*@_init_EPILOG_BEGINS*/");
  SECTION(".init");
}

Here is the call graph for this function:

asm ( "\n#include \"defs.h\""  )
asm ( "\n/*@HEADER_ENDS*/"  )
asm ( "\n/*@TESTS_BEGIN*/"  )
asm ( "\n/*@TESTS_END*/"  )
asm ( "\n/*@_init_PROLOG_BEGINS*/"  )
asm ( "END_INIT"  )
asm ( "\n/*@_init_EPILOG_ENDS*/"  )
asm ( "\n/*@_fini_PROLOG_BEGINS*/"  )
asm ( "END_FINI"  )
asm ( "\n/*@_fini_EPILOG_ENDS*/"  )
asm ( "\n/*@TRAILER_BEGINS*/"  )
static void call_initialize_minimal ( void  ) [static]

Definition at line 66 of file pt-initfini.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void dummy ( void(*)(void)  foo)

Definition at line 55 of file pt-initfini.c.

{
  if (foo)
    (*foo) ();
}
SECTION ( ".init"  )
SECTION ( ".fini"  )