summaryrefslogtreecommitdiff
path: root/elf/dep1.c
blob: 7ef47adb4382c01913f150aea2037fe5f2ee6ed1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <unistd.h>

extern int dep1 (void);
extern int dep2 (void);
extern int dep4 (void);

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

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

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