Back to index

glibc  2.9
Functions | Variables
tst-array5.c File Reference
#include <string.h>
#include <unistd.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

static void preinit_0 (int argc __attribute__((unused)), char **argv)
static void init_0 (int argc __attribute__((unused)), char **argv)
int main (void)

Variables

void(*const preinit_array [])(int, char **)
void(*const init_array [])(int, char **)

Function Documentation

static void init_0 ( int argc   __attribute__(unused),
char **  argv 
) [static]

Definition at line 26 of file tst-array5.c.

{
  char *p = strrchr (argv [0], '/');

  if (p == NULL)
      return;

  p++;
  size_t len = strlen (p);
  write (STDOUT_FILENO, "init array in executable: ", 26);
  write (STDOUT_FILENO, p, len);
  write (STDOUT_FILENO, "\n", 1);
}

Here is the call graph for this function:

int main ( void  )

Definition at line 47 of file tst-array5.c.

{
  return 0;
}
static void preinit_0 ( int argc   __attribute__(unused),
char **  argv 
) [static]

Definition at line 5 of file tst-array5.c.

{
  char *p = strrchr (argv [0], '/');

  if (p == NULL)
      return;

  p++;
  size_t len = strlen (p);
  write (STDOUT_FILENO, "preinit array in executable: ", 29);
  write (STDOUT_FILENO, p, len);
  write (STDOUT_FILENO, "\n", 1);
}

Here is the call graph for this function:


Variable Documentation

void(*const init_array[])(int, char **)

Definition at line 40 of file tst-array5.c.

{
  &init_0,
};
void(*const preinit_array[])(int, char **)

Definition at line 19 of file tst-array5.c.

{
  &preinit_0,
};