2015-12-23 14:22:33 +00:00
|
|
|
build "core init test/ldso"
|
2011-12-22 15:19:25 +00:00
|
|
|
|
|
|
|
create_boot_directory
|
|
|
|
|
2015-12-23 14:22:33 +00:00
|
|
|
set config {
|
2011-12-22 15:19:25 +00:00
|
|
|
<config>
|
|
|
|
<parent-provides>
|
|
|
|
<service name="ROM"/>
|
2017-01-18 16:10:07 +00:00
|
|
|
<service name="RAM"/>
|
|
|
|
<service name="CPU"/>
|
2011-12-22 15:19:25 +00:00
|
|
|
<service name="LOG"/>
|
2017-01-18 16:10:07 +00:00
|
|
|
<service name="PD"/>
|
2011-12-22 15:19:25 +00:00
|
|
|
</parent-provides>
|
|
|
|
<default-route>
|
|
|
|
<any-service> <parent/> </any-service>
|
|
|
|
</default-route>
|
|
|
|
<start name="test-ldso">
|
2013-05-06 14:29:23 +00:00
|
|
|
<resource name="RAM" quantum="2M"/>
|
2014-05-20 09:40:50 +00:00
|
|
|
<config ld_bind_now="no" ld_verbose="no">
|
2017-01-03 13:33:55 +00:00
|
|
|
<vfs> <dir name="dev"> <log/> </dir> </vfs>
|
|
|
|
<libc stdout="/dev/log"/>
|
2014-04-14 09:57:22 +00:00
|
|
|
</config>
|
2011-12-22 15:19:25 +00:00
|
|
|
</start>
|
|
|
|
</config>
|
|
|
|
}
|
|
|
|
|
2015-12-23 14:22:33 +00:00
|
|
|
install_config $config
|
|
|
|
|
2014-05-20 09:40:50 +00:00
|
|
|
set boot_modules {
|
|
|
|
core init test-ldso test-ldso_lib_1.lib.so
|
|
|
|
test-ldso_lib_2.lib.so test-ldso_lib_dl.lib.so
|
|
|
|
ld.lib.so libc.lib.so libm.lib.so
|
|
|
|
}
|
|
|
|
|
|
|
|
build_boot_image $boot_modules
|
2011-12-22 15:19:25 +00:00
|
|
|
|
|
|
|
append qemu_args "-nographic -m 64"
|
|
|
|
|
2014-08-22 12:43:54 +00:00
|
|
|
run_genode_until {child ".*" exited with exit value 123.*\n} 10
|
2011-12-22 15:19:25 +00:00
|
|
|
|
|
|
|
# pay only attention to the output of init and its children
|
2013-01-14 11:13:05 +00:00
|
|
|
grep_output {^\[init }
|
2016-04-15 13:19:22 +00:00
|
|
|
unify_output {\[init \-\> test\-ldso\] upgrading quota donation for .* \([0-9]+ bytes\)} ""
|
2017-02-22 12:57:48 +00:00
|
|
|
unify_output {ram_quota=[0-9]+} "ram_quota=UNIFIED"
|
2016-04-15 13:19:22 +00:00
|
|
|
trim_lines
|
2011-12-22 15:19:25 +00:00
|
|
|
|
|
|
|
compare_output_to {
|
2014-02-05 13:46:59 +00:00
|
|
|
[init -> test-ldso] Lib_2_global 11223343
|
|
|
|
[init -> test-ldso] Lib_1_global_1 5060707
|
|
|
|
[init -> test-ldso] Lib_1_global_2 1020303
|
|
|
|
[init -> test-ldso] lib_1_attr_constructor_2 4030200f
|
|
|
|
[init -> test-ldso] lib_1_attr_constructor_1 8070604f
|
|
|
|
[init -> test-ldso] Global_1 5060707
|
|
|
|
[init -> test-ldso] Global_2 1020303
|
|
|
|
[init -> test-ldso] attr_constructor_2 4030200f
|
|
|
|
[init -> test-ldso] attr_constructor_1 8070604f
|
|
|
|
[init -> test-ldso]
|
|
|
|
[init -> test-ldso] Dynamic-linker test
|
|
|
|
[init -> test-ldso] ===================
|
|
|
|
[init -> test-ldso]
|
|
|
|
[init -> test-ldso] Global objects and local static objects of program
|
|
|
|
[init -> test-ldso] --------------------------------------------------
|
|
|
|
[init -> test-ldso] global_1 5060706
|
|
|
|
[init -> test-ldso] global_2 1020302
|
|
|
|
[init -> test-ldso] Local_1 5060707f
|
|
|
|
[init -> test-ldso] local_1 5060707e
|
|
|
|
[init -> test-ldso] Local_2 1020303f
|
|
|
|
[init -> test-ldso] local_2 1020303e
|
|
|
|
[init -> test-ldso] pod_1 8070604e
|
|
|
|
[init -> test-ldso] pod_2 4030200e
|
|
|
|
[init -> test-ldso]
|
|
|
|
[init -> test-ldso] Access shared lib from program
|
|
|
|
[init -> test-ldso] ------------------------------
|
|
|
|
[init -> test-ldso] lib_2_global 11223342
|
|
|
|
[init -> test-ldso] Lib_1_local_3 12345677
|
|
|
|
[init -> test-ldso] lib_1_local_3 12345676
|
|
|
|
[init -> test-ldso] lib_1_pod_1 8070604d
|
|
|
|
[init -> test-ldso] Libc::read:
|
base: avoid use of deprecated base/printf.h
Besides adapting the components to the use of base/log.h, the patch
cleans up a few base headers, i.e., it removes unused includes from
root/component.h, specifically base/heap.h and
ram_session/ram_session.h. Hence, components that relied on the implicit
inclusion of those headers have to manually include those headers now.
While adjusting the log messages, I repeatedly stumbled over the problem
that printing char * arguments is ambiguous. It is unclear whether to
print the argument as pointer or null-terminated string. To overcome
this problem, the patch introduces a new type 'Cstring' that allows the
caller to express that the argument should be handled as null-terminated
string. As a nice side effect, with this type in place, the optional len
argument of the 'String' class could be removed. Instead of supplying a
pair of (char const *, size_t), the constructor accepts a 'Cstring'.
This, in turn, clears the way let the 'String' constructor use the new
output mechanism to assemble a string from multiple arguments (and
thereby getting rid of snprintf within Genode in the near future).
To enforce the explicit resolution of the char * ambiguity, the 'char *'
overload of the 'print' function is marked as deleted.
Issue #1987
2016-07-13 17:07:09 +00:00
|
|
|
[init -> test-ldso] Error: no plugin found for read(0)
|
2014-02-05 13:46:59 +00:00
|
|
|
[init -> test-ldso] Libc::abs(-10): 10
|
|
|
|
[init -> test-ldso]
|
|
|
|
[init -> test-ldso] Catch exceptions in program
|
|
|
|
[init -> test-ldso] ---------------------------
|
|
|
|
[init -> test-ldso] exception in remote procedure call:
|
2017-02-22 12:57:48 +00:00
|
|
|
[init -> test-ldso] Error: ROM-session creation failed (ram_quota=UNIFIED, label="unknown_file")
|
2016-05-12 12:58:51 +00:00
|
|
|
[init -> test-ldso] Error: Could not open ROM session for "unknown_file"
|
2014-02-05 13:46:59 +00:00
|
|
|
[init -> test-ldso] caught
|
|
|
|
[init -> test-ldso] exception in program: caught
|
|
|
|
[init -> test-ldso] exception in shared lib: caught
|
|
|
|
[init -> test-ldso] exception in dynamic linker: caught
|
|
|
|
[init -> test-ldso]
|
|
|
|
[init -> test-ldso] global objects and local static objects of shared lib
|
|
|
|
[init -> test-ldso] -----------------------------------------------------
|
|
|
|
[init -> test-ldso] lib_1_global_1 5060706
|
|
|
|
[init -> test-ldso] lib_1_global_2 1020302
|
|
|
|
[init -> test-ldso] Lib_1_local_1 5060707f
|
|
|
|
[init -> test-ldso] lib_1_local_1 5060707e
|
|
|
|
[init -> test-ldso] Lib_1_local_2 1020303f
|
|
|
|
[init -> test-ldso] lib_1_local_2 1020303e
|
|
|
|
[init -> test-ldso] lib_1_pod_1 8070604e
|
|
|
|
[init -> test-ldso] lib_1_pod_2 4030200e
|
|
|
|
[init -> test-ldso]
|
|
|
|
[init -> test-ldso] Access shared lib from another shared lib
|
|
|
|
[init -> test-ldso] -----------------------------------------
|
|
|
|
[init -> test-ldso] lib_2_global 11223341
|
|
|
|
[init -> test-ldso] Lib_2_local 55667787
|
|
|
|
[init -> test-ldso] lib_2_local 55667786
|
|
|
|
[init -> test-ldso] lib_2_pod_1 87654320
|
|
|
|
[init -> test-ldso]
|
|
|
|
[init -> test-ldso] Catch exceptions in shared lib
|
|
|
|
[init -> test-ldso] ------------------------------
|
|
|
|
[init -> test-ldso] exception in lib: caught
|
|
|
|
[init -> test-ldso] exception in another shared lib: caught
|
|
|
|
[init -> test-ldso]
|
2014-05-20 09:40:50 +00:00
|
|
|
[init -> test-ldso] Test stack alignment
|
2014-02-06 16:09:53 +00:00
|
|
|
[init -> test-ldso] --------------------
|
|
|
|
[init -> test-ldso] <warning: unsupported format string argument>
|
|
|
|
[init -> test-ldso] <warning: unsupported format string argument>
|
|
|
|
[init -> test-ldso] <warning: unsupported format string argument>
|
|
|
|
[init -> test-ldso] <warning: unsupported format string argument>
|
|
|
|
[init -> test-ldso]
|
2014-05-20 09:40:50 +00:00
|
|
|
[init -> test-ldso] Dynamic cast
|
|
|
|
[init -> test-ldso] ------------
|
|
|
|
[init -> test-ldso] 'Object' called: good
|
|
|
|
[init -> test-ldso]
|
2015-01-08 11:31:36 +00:00
|
|
|
[init -> test-ldso] Shared-object API
|
|
|
|
[init -> test-ldso] -----------------
|
|
|
|
[init -> test-ldso] Global object constructed
|
|
|
|
[init -> test-ldso]
|
2014-05-20 09:40:50 +00:00
|
|
|
[init -> test-ldso] Destruction
|
|
|
|
[init -> test-ldso] -----------
|
2014-02-05 13:46:59 +00:00
|
|
|
[init -> test-ldso] ~Lib_2_local 55667785
|
|
|
|
[init -> test-ldso] ~Lib_1_local_2 1020303d
|
|
|
|
[init -> test-ldso] ~Lib_1_local_1 5060707d
|
|
|
|
[init -> test-ldso] ~Lib_1_local_3 12345675
|
|
|
|
[init -> test-ldso] ~Local_2 1020303d
|
|
|
|
[init -> test-ldso] ~Local_1 5060707d
|
|
|
|
[init -> test-ldso] attr_destructor_2 4030200d
|
|
|
|
[init -> test-ldso] attr_destructor_1 8070604c
|
|
|
|
[init -> test-ldso] ~Global_2 1020301
|
|
|
|
[init -> test-ldso] ~Global_1 5060705
|
|
|
|
[init -> test-ldso] ~Lib_1_global_2 1020301
|
|
|
|
[init -> test-ldso] ~Lib_1_global_1 5060705
|
|
|
|
[init -> test-ldso] ~Lib_2_global 11223340
|
2011-12-22 15:19:25 +00:00
|
|
|
}
|