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
Add tests for errno after sin/cos calls with ±Inf.
[glibc/history.git]
/
elf
/
unload6.c
blob
1efc7eb841dc40f9fec69f933470258f39f5ea9c
1
#include <dlfcn.h>
2
#include <stdio.h>
3
4
int
5
main
(
void
)
6
{
7
void
*
h
=
dlopen
(
"unload6mod1.so"
,
RTLD_LAZY
);
8
if
(
h
==
NULL
)
9
{
10
puts
(
"dlopen unload6mod1.so failed"
);
11
return
1
;
12
}
13
14
int
(*
fn
) (
int
);
15
fn
=
dlsym
(
h
,
"foo"
);
16
if
(
fn
==
NULL
)
17
{
18
puts
(
"dlsym failed"
);
19
return
1
;
20
}
21
22
int
val
=
fn
(
16
);
23
if
(
val
!=
24
)
24
{
25
printf
(
"foo returned %d != 24
\n
"
,
val
);
26
return
1
;
27
}
28
29
return
0
;
30
}