vfs: check userland buffers before reading them.
[haiku.git] / src / tests / system / runtime_loader / test_suite / load_resolve_order1
blob9869610cb71678412a4e6beefc750b201c8dfcee
1 #!/bin/sh
3 # program
4 # <- liba.so
5 # <- libb.so
6 # <- libb_dependency.so
8 # Expected: Undefined symbol in program resolves to symbol in liba.so,
9 # not to symbol in libb_dependency.so.
12 . ./test_setup
15 # create liba.so
16 cat > liba.c << EOI
17 int a() { return 1; }
18 EOI
20 # build
21 compile_lib -o liba.so liba.c
24 # create libb_dependency.so
25 cat > libb_dependency.c << EOI
26 int a() { return 2; }
27 EOI
29 # build
30 compile_lib -o libb_dependency.so libb_dependency.c
33 # create libb.so
34 cat > libb.c << EOI
35 int b() { return 1; }
36 EOI
38 # build
39 compile_lib -o libb.so libb.c ./libb_dependency.so
42 # create program
43 cat > program.c << EOI
44 extern int a();
45 int
46 main()
48 return a();
50 EOI
52 # build
53 compile_program -o program program.c ./liba.so ./libb.so
55 # run
56 test_run_ok ./program 1