summary refs log tree commit diff
path: root/elf/dep2.c
blob: 9dc5cfcf55dc3df521248a4b616b5405aa4568b9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <unistd.h>

extern int dep3 (void);
extern int dep4 (void);

static void
__attribute__ ((constructor))
init (void)
{
  write (1, "2", 1);
}

static void
__attribute__ ((destructor))
fini (void)
{
  write (1, "7", 1);
}

int
dep2 (void)
{
  return dep3 () - dep4 ();
}