next iteration of golang support attempt

Josef Söntgen josef.soentgen at genode-labs.com
Thu Apr 8 13:24:30 CEST 2021


Hallo Alexander,

> 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

My bad - the first commit from yesterday is incomplete. Merely making
the symbols available for linking is not enough. Since the implementation
is global hidden we have to make it also accessible. Please also apply
the following commit [1].

  [1] https://github.com/cnuke/genode/commit/3eb8312daee2ae24f7eea43adf7697dbfd0c9568

> interesting that I do not find a code for _Unwind_Backtrace inside libc.lib.so

That is correct because the code is not there. We make the symbols available
so that the linking stage for components that solely link against the
libc will not fail. At run-time the implementation is provided by the dynamic
linker (ld.lib.so). If you look around in the base repository's library .mk
files and check the resulting unstripped shared-objects (e.g. objdump -x) the
picture should become clear.

(All in all, long-term it is probably better to provide the unwind
functionality in way that accommodates the needs of the Genode base system as
well as as the needs of different languague runtimes rather (ab-)using
the one that is primarily tailored to Genode's base system.)


Regards
Josef

-- 
Josef Söntgen
Genode Labs

http://www.genode-labs.com/ · http://genode.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.genode.org/pipermail/users/attachments/20210408/54815658/attachment.sig>


More information about the users mailing list