aboutsummaryrefslogtreecommitdiff
path: root/elf/constload2.c
blob: f109838cb8b760cf980754657e6537572d520d58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <dlfcn.h>

extern int bar (void);

void *h;

int
foo (void)
{
  return 42 + bar ();
}

int
baz (void)
{
  return -21;
}

void
__attribute__ ((__constructor__))
init (void)
{
  h = dlopen ("constload3.so", RTLD_GLOBAL | RTLD_LAZY);
}