about summary refs log tree commit diff
path: root/elf/order.c
blob: 4544591c5067aa0ef7489fb4dee1e37d644ff3ac (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
#include <unistd.h>

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

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

extern int dep1 (void);

int
main (void)
{
  return dep1 () != 42;
}