Back to index

glibc  2.9
Functions | Variables
tst-alignmod2.c File Reference
#include <stdbool.h>
#include <stdio.h>
#include <tst-stack-align.h>
#include <unistd.h>

Go to the source code of this file.

Functions

static void __attribute__ ((constructor))
void in_dso (int *result, bool *test_destructors, int *fd)
static void __attribute__ ((destructor))

Variables

static int res
static intfdp
static bool * test_destructorsp

Function Documentation

static void __attribute__ ( (constructor)  ) [static]

Definition at line 28 of file tst-alignmod2.c.

{
  res = TEST_STACK_ALIGN () ? -1 : 1;
}
static void __attribute__ ( (destructor)  ) [static]

Definition at line 52 of file tst-alignmod2.c.

{
  if (!test_destructorsp || !*test_destructorsp)
    return;

  char c = TEST_STACK_ALIGN () ? 'D' : 'C';
  write (*fdp, &c, 1);
}

Here is the call graph for this function:

void in_dso ( int result,
bool *  test_destructors,
int fd 
)

Definition at line 35 of file tst-alignmod2.c.

{
  if (!res)
    {
      puts ("constructor has not been run");
      *result = 1;
    }
  else if (res != 1)
    {
      puts ("constructor has been run without sufficient alignment");
      *result = 1;
    }

  test_destructorsp = test_destructors;
  fdp = fd;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

int * fdp [static]

Definition at line 25 of file tst-alignmod2.c.

int res [static]

Definition at line 25 of file tst-alignmod2.c.

bool* test_destructorsp [static]

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