> Please give the following two commits [1], [2] a try. The first exports > the required Unwind functions needed by the libgo runtime and the second > removes the direct usage of the toolchain libraries. > > With both commits applied the 'go_app' test component still works and > hopefully it addresses your SMP issue as well. > > [1] > https://github.com/cnuke/genode/commit/e19b19e0367e544654bc917e09c2cb991b71b211 > [2] > https://github.com/cnuke/genode-world/commit/30ef976ebdd58becb1785993cd184344625f0403 > > Your problem boils down to using the toolchain libraries directly, which > is not supported and forced the compiler to produce the PLT relocations > (as strlen() is unresolved at this point). On Genode you are supposed to > go through the base library, i.e. ld.lib.so, that already takes care of > setting things up the proper way. As the Unwind symbols required by the > libgo runtime were not exported the linking step of the 'go_app' probably > failed.
hm, I apply patch- it works ok for UP. But, for SMP (2 CPU - just replace -smp 1 option in .run file) it return the following: [init] child "test-go" [init] RAM quota: 20232K [init] cap quota: 216 [init] ELF binary: test-go [init] priority: 0 [init -> timer] 0x1000000 .. 0x10ffffff: linker area [init -> timer] 0x40000000 .. 0x4fffffff: stack area [init -> timer] 0x30000 .. 0x161fff: ld.lib.so [init -> test-go] 0x1000000 .. 0x10ffffff: linker area [init] child "timer" announces service "Timer" [init -> test-go] 0x40000000 .. 0x4fffffff: stack area [init -> test-go] 0x30000 .. 0x161fff: ld.lib.so [init -> test-go] 0x10e0c000 .. 0x10ffffff: libc.lib.so [init -> test-go] 0x10d70000 .. 0x10e0bfff: vfs.lib.so [init -> test-go] 0x10d36000 .. 0x10d6ffff: libm.lib.so [init -> test-go] 0x1328000 .. 0x14dffff: stdcxx.lib.so [init -> test-go] Error: LD: jump slot relocation failed for symbol: '_Unwind_Backtrace' [init -> test-go] Error: Uncaught exception of type 'Linker::Not_found' [init -> test-go] Warning: abort called - thread: ep interesting that I do not find a code for _Unwind_Backtrace inside libc.lib.so Seems that I have a bit different code path for UP and SMP cases. In particular, I found that code related to the read of myself executable file invoked only in case of SMP (I still not solve the problem of open for myself, I receive some recommendation from Uwe, but seems that I need to have some more code samples to access to the file). so, this time problem could be the same, need to dig deeper: source for this «Not_found» problem below - seems that again it try to do something with stack parsing: #2 Genode::Placeable::Placeable (args#2=..., args#6=..., args#5=..., args#4=..., args#3=..., args#1=..., args#0=..., this=0x11b0740 <type..func.8.9.8>) at /var/services/homes/admin/gen/21.02/repos/base/include/util/construct_at.h:56 #3 Genode::construct_at<Genode::Local_connection<Genode::Rom_connection>, Genode::Child::Env_connection<Genode::Rom_connection>::Env_service&, Genode::Id_space<Genode::Parent::Client>&, Genode::Id_space<Genode::Parent::Client>::Id const&, Genode::String<256> const&, Genode::Affinity&, Genode::Session_label const&, Genode::Session::Diag const&> (at=0x11b0740 <type..func.8.9.8>) at /var/services/homes/admin/gen/21.02/repos/base/include/util/construct_at.h:82 #4 Genode::Reconstructible<Genode::Local_connection<Genode::Rom_connection> >::_do_construct<Genode::Child::Env_connection<Genode::Rom_connection>::Env_service&, Genode::Id_space<Genode::Parent::Client>&, Genode::Id_space<Genode::Parent::Client>::Id const&, Genode::String<256ul> const&, Genode::Affinity&, Genode::Session_label const&, Genode::Session::Diag const&> (this=0x11b0740 <type..func.8.9.8>) at /var/services/homes/admin/gen/21.02/repos/base/include/util/reconstructible.h:55 #5 Genode::Reconstructible<Genode::Local_connection<Genode::Rom_connection> >::construct<Genode::Child::Env_connection<Genode::Rom_connection>::Env_service&, Genode::Id_space<Genode::Parent::Client>&, Genode::Id_space<Genode::Parent::Client>::Id const&, Genode::String<256ul> const&, Genode::Affinity, Genode::Session_label const&, Genode::Session::Diag const&> (this=0x11b0740 <type..func.8.9.8>) at /var/services/homes/admin/gen/21.02/repos/base/include/util/reconstructible.h:110 #6 Genode::Child::Env_connection<Genode::Rom_connection>::initiate (this=0xc42000c038) at /var/services/homes/admin/gen/21.02/repos/base/include/base/child.h:582 #7 0x00000000011985d1 in runtime_callers (skip=0x2, locbuf=0xc42000e8d8, m=0x20, keep_thunks=0x0) at /var/services/homes/admin/gen/21.02/contrib/libgo-281260d9bdc27fefb62c00310025c54e1e629a2e/src/lib/gcc/libgo/runtime/go-callers.c:207 #8 0x00000000010fdee8 in runtime.callers (skip=0x1, locbuf=...) at /var/services/homes/admin/gen/21.02/contrib/libgo-281260d9bdc27fefb62c00310025c54e1e629a2e/src/lib/gcc/libgo/go/runtime/traceback_gccgo.go:56 #9 0x00000000010d8f3d in runtime.mcommoninit (mp=0xc42000e800) at /var/services/homes/admin/gen/21.02/contrib/libgo-281260d9bdc27fefb62c00310025c54e1e629a2e/src/lib/gcc/libgo/go/runtime/proc.go:546 #10 0x00000000010db685 in runtime.allocm (_p_=0xc420008000, fn=0x1219ed8 <runtime.mspinning..f>, allocatestack=0x0) at /var/services/homes/admin/gen/21.02/contrib/libgo-281260d9bdc27fefb62c00310025c54e1e629a2e/src/lib/gcc/libgo/go/runtime/proc.go:1466 _______________________________________________ Genode users mailing list [email protected] https://lists.genode.org/listinfo/users
