about summary refs log tree commit diff
path: root/elf/order2mod2.c
blob: b03fb60fa3897640f7833931f82ab133d1617c9b (plain) (blame)
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)
{
  foo () - bar ();
}

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