base-linux: LD: exception during program load

Pirmin Duss pirmin.duss at gapfruit.com
Tue Dec 20 17:14:54 CET 2022


Hello Christian


On 20.12.22 16:16, Christian Helmuth wrote:
> Hello Pirmin,
> 
> On Tue, Dec 20, 2022 at 15:21:04 CET, Pirmin Duss wrote:
> 
> The return value of mmap() is -19 "No such device" which is documented
> in the man page like follows.
> 
>    ENODEV The underlying filesystem of the specified file does not
>           support memory mapping.
> 
> Did you log the file name of the Elf_file? Where is it located? What's
> the output of "objdump -p elf_file"?


Two files are loaded:
  - name=ld.lib.so
  - name=binary

I'm guessing, that binary is expanded to the name of the binary to run, 
which is wamedge.

The output is as follows:

```
% objdump -p var/bin/x86_64/wasmedge

var/bin/x86_64/wasmedge:     file format elf64-x86-64

Program Header:
   INTERP off    0x0000000000001645 vaddr 0x0000000001000645 paddr 
0x0000000001000645 align 2**0
          filesz 0x000000000000000f memsz 0x000000000000000f flags r--
     LOAD off    0x0000000000001000 vaddr 0x0000000001000000 paddr 
0x0000000001000000 align 2**12
          filesz 0x0000000000000c64 memsz 0x0000000000000c64 flags r-x
     LOAD off    0x0000000000002000 vaddr 0x0000000001001000 paddr 
0x0000000001001000 align 2**12
          filesz 0x0000000000000278 memsz 0x00000000000002a0 flags rw-
  DYNAMIC off    0x00000000000020c8 vaddr 0x00000000010010c8 paddr 
0x00000000010010c8 align 2**4
          filesz 0x00000000000001b0 memsz 0x00000000000001cc flags rw-
EH_FRAME off    0x0000000000001c38 vaddr 0x0000000001000c38 paddr 
0x0000000001000c38 align 2**2
          filesz 0x000000000000002c memsz 0x000000000000002c flags r--

Dynamic Section:
   NEEDED               libc.lib.so
   NEEDED               libm.lib.so
   NEEDED               posix.lib.so
   NEEDED               c++fs.lib.so
   NEEDED               libspdlog.lib.so
   NEEDED               stdcxx.lib.so
   NEEDED               zlib.lib.so
   NEEDED               ../../lib/api/libwasmedge.lib.so
   HASH                 0x0000000001000658
   STRTAB               0x0000000001000848
   SYMTAB               0x00000000010006b0
   STRSZ                0x0000000000000149
   SYMENT               0x0000000000000018
   DEBUG                0x0000000000000000
   PLTGOT               0x0000000001001250
   PLTRELSZ             0x0000000000000018
   PLTREL               0x0000000000000007
   JMPREL               0x0000000001000998
```

Regards



More information about the users mailing list