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
Add build-many-glibcs.py arm-linux-gnueabihf-v7{-disable-multiarch}
[glibc.git]
/
elf
/
tst-unique2.c
blob
e0173b7bccae8426bda9cb7b0e162934539f1416
1
#include <config.h>
2
#include <dlfcn.h>
3
#include <stdio.h>
4
5
extern
int
var
;
6
7
static int
8
do_test
(
void
)
9
{
10
var
=
1
;
11
12
void
*
h
=
dlopen
(
"tst-unique2mod2.so"
,
RTLD_LAZY
);
13
if
(
h
==
NULL
)
14
{
15
puts
(
"cannot load tst-unique2mod2"
);
16
return
1
;
17
}
18
int
(*
f
) (
int
*) =
dlsym
(
h
,
"f"
);
19
if
(
f
==
NULL
)
20
{
21
puts
(
"cannot locate f in tst-unique2mod2"
);
22
return
1
;
23
}
24
return
f
(&
var
);
25
}
26
27
#include <support/test-driver.c>