repo.or.cz
/
glibc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Update.
[glibc.git]
/
elf
/
constload1.c
blob
1435284c62012d0ca6f759cf0abcc2bab042fd3b
1
#include <dlfcn.h>
2
#include <errno.h>
3
#include <error.h>
4
#include <stdlib.h>
5
6
int
7
main
(
void
)
8
{
9
int
(*
foo
) (
void
);
10
void
*
h
;
11
int
ret
;
12
13
h
=
dlopen
(
"constload2.so"
,
RTLD_LAZY
|
RTLD_GLOBAL
);
14
if
(
h
==
NULL
)
15
error
(
EXIT_FAILURE
,
errno
,
"cannot load module
\"
constload2.so
\"
"
);
16
foo
=
dlsym
(
h
,
"foo"
);
17
ret
=
foo
();
18
dlclose
(
h
);
19
return
ret
;
20
}