vfs: check userland buffers before reading them.
[haiku.git] / src / tests / system / runtime_loader / test_suite / load_resolve_order4
blob05cf64e921a732fc28f3b6418330bcceb9f7864b
1 #!/bin/sh
3 # program
4 # <- libb.so
5 # <- libb_dependency.so
7 # Expected: Undefined symbol in libb.so resolves to symbol in program,
8 # not to symbol in libb_dependency.so.
11 . ./test_setup
14 # create libb_dependency.so
15 cat > libb_dependency.c << EOI
16 int a() { return 2; }
17 EOI
19 # build
20 compile_lib -o libb_dependency.so libb_dependency.c
23 # create libb.so
24 cat > libb.c << EOI
25 extern int a();
26 int b() { return a(); }
27 EOI
29 # build
30 compile_lib -o libb.so libb.c ./libb_dependency.so
33 # create program
34 cat > program.c << EOI
36 extern int b();
38 int a() { return 1; }
40 int
41 main()
43 return b();
45 EOI
47 # build
48 compile_program -o program program.c ./libb.so
50 # run
51 test_run_ok ./program 1