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]
/
dlfcn
/
failtestmod.c
blob
595da4d567834c8e1ab90be9326d42d1181bf9b6
1
#include <dlfcn.h>
2
#include <stdio.h>
3
4
5
void
6
__attribute__
((
__constructor__
))
7
constr
(
void
)
8
{
9
void
*
handle
;
10
void
*
m
;
11
12
/* Open the library. */
13
handle
=
dlopen
(
NULL
,
RTLD_NOW
);
14
if
(
handle
==
NULL
)
15
{
16
puts
(
"Cannot get handle to own object"
);
17
return
;
18
}
19
20
/* Get a symbol. */
21
m
=
dlsym
(
handle
,
"main"
);
22
puts
(
"called dlsym() to get main"
);
23
24
dlclose
(
handle
);
25
}