I'd highly recommend trying a different kernel if possible. NOVA and hw are the most reliable in my experience, followed by Linux and FOC. For x86_64, at least, seL4 support seems to come in last for me. Plenty of run scripts work on NOVA and hw but not on seL4, so I'd suggest you debug your component on those first, then switch to seL4.

On Mon, Aug 5, 2019, 8:28 AM Christian Helmuth <christian.helmuth@genode-labs.com> wrote:
Hi Alexander,

I see two issues from the info you provided (see below).

On Mon, Aug 05, 2019 at 15:39:57 CEST, Alexander Tormasov via users wrote:
>     LOAD off    0x0000000000001000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**12
>          filesz 0x000000000000023c memsz 0x000000000000023c flags r--
>     LOAD off    0x0000000000002000 vaddr 0x0000000000001000 paddr 0x0000000000001000 align 2**12
>          filesz 0x0000000000000100 memsz 0x0000000000000100 flags rw-

The load addresses (vaddr) of your program segments are
unrealistically low at 0x0 and 0x1000. At least the first segment is
not loadable because Genode region maps (aka virtual memory) starts at
0x1000 to detect nullptr dereferences.

> genode/tool/19.05/bin/genode-x86-gccgo -static -Wl,-melf_x86_64
> -Wl,-gc-sections -Wl,-z -Wl,max-page-size=0x1000
> -Wl,--dynamic-list=genode/repos/base/src/ld/genode_dyn.dl -nostdlib
> -Wl,-nostdlib -Wl,-Ttext=0x01000000 -m64 -mcmodel=large
> -Wl,--dynamic-linker=ld.lib.so -Wl,--eh-frame-hdr -Wl,-rpath-link=.
> -Wl,-T -Wl,genode/repos/base/src/ld/genode_dyn.ld
> -Wl,--whole-archive -Wl,--start-group main.o $libs/base/base.lib.a
> ld.lib.so  -Wl,--no-whole-archive -Wl,--end-group
> /usr/local/genode/tool/19.05/bin/../lib/gcc/x86_64-pc-elf/8.3.0/64/libgcc.a
> -o test-go

The command-line arguments for gccgo contradict as they demand a
statically linked binary by "-static" but also use the linker script for
dynamically-linked components "-Wl,-T -Wl,genode/repos/base/src/ld/genode_dyn.ld"
and "--dynamic-linker=ld.lib.so".

You have two options: remove "-static" or use the correct command-line
arguments for statically linked components. You may deduce the correct
arguments by changing the LIBS variable in your target.mk to

  LIBS = base-sel4

and runnning

  make -C build/x86_64/ KERNEL=sel4 test/app VERBOSE=

Don't forget to change your init configuration for the
statically-linked component like follows to prevent the use of the
dynamic linker ld.lib.so.

    <start name="test-go" ld="no">
      <resource name="RAM" quantum="128M"/>
    </start>

Regards
--
Christian Helmuth
Genode Labs

https://www.genode-labs.com/ · https://genode.org/
https://twitter.com/GenodeLabs · /ˈdʒiː.nəʊd/

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth

_______________________________________________
Genode users mailing list
users@lists.genode.org
https://lists.genode.org/listinfo/users