repo.or.cz
/
glibc
/
history.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Minimal message improvements.
[glibc/history.git]
/
elf
/
initfirst.c
blob
5ca83d21bc4da0c5b58c91238f7b342b71dac827
1
#include <dlfcn.h>
2
#include <stdio.h>
3
4
int
5
main
(
void
)
6
{
7
void
*
h
=
dlopen
(
"firstobj.so"
,
RTLD_LAZY
);
8
void
*
f
;
9
if
(!
h
)
10
{
11
printf
(
"cannot find firstobj.so: %s
\n
"
,
dlerror
());
12
return
1
;
13
}
14
f
=
dlsym
(
h
,
"foo"
);
15
if
(!
f
)
16
{
17
printf
(
"cannot find symbol foo: %s
\n
"
,
dlerror
());
18
return
2
;
19
}
20
((
void
(*) (
void
))
f
) ();
21
return
0
;
22
}