mystique error during app load

Christian Helmuth christian.helmuth at genode-labs.com
Mon Aug 5 16:28:03 CEST 2019


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



More information about the users mailing list