summaryrefslogtreecommitdiff
path: root/elf/order2mod2.c
blob: 026cd2acc46825ccee15d7b1437c0d9881a4a998 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <stdio.h>

extern int foo (void);
extern int bar (void);

void
__attribute__ ((constructor))
init (void)
{
  (void) (foo () - bar ());
}

static void
__attribute__ ((destructor))
fini (void)
{
  putchar ('2');
}