blob: 9c834eafffea41199e7b331ef7fffa9c04fd61d3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#include <stdio.h>
#include <assert.h>
int fooDone = 0;
// DSOs do not support pre-initialization functions.
__attribute__((constructor))
void fooInit() {
dprintf(1, "initialization function called in foo\n");
assert(fooDone == 0);
fooDone++;
}
int isFooDone() {
return fooDone;
}
|