repo.or.cz
/
haiku.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
vfs: check userland buffers before reading them.
[haiku.git]
/
src
/
tests
/
system
/
runtime_loader
/
test_suite
/
load_resolve_basic1
blob
506ae29c5bc4cd9d8be6c740893e4e9e8cc84225
1
#!/bin/sh
2
3
# program
4
# <- liba.so
5
#
6
# Expected: Undefined symbol in liba.so resolves to symbol in program.
7
8
9
. .
/
test_setup
10
11
12
# create liba.so
13
cat
>
liba.c
<< EOI
14
extern int b();
15
int a() { return b(); }
16
EOI
17
18
# build
19
compile_lib
-o
liba.so liba.c
20
21
22
# create program
23
cat
>
program.c
<< EOI
24
extern int a();
25
26
int
27
b()
28
{
29
return 1;
30
}
31
32
int
33
main()
34
{
35
return a();
36
}
37
EOI
38
39
# build
40
compile_program
-o
program program.c .
/
liba.so
41
42
# run
43
test_run_ok .
/
program
1
44