glibc/elf/order2mod2.c
Ulrich Drepper 3d786f1969 * elf/Makefile: Add rules to build and run order2.
* elf/order2.c: New file.
	* elf/order2mod1.c: New file.
	* elf/order2mod2.c: New file.
	* elf/order2mod3.c: New file.
	* elf/order2mod4.c: New file.
2005-03-19 08:04:37 +00:00

19 lines
212 B
C

#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');
}