Closed jedisct1 closed 5 months ago
With the hello
example:
./elfconv.sh ../examples/hello/a.out
[INFO] Building libelfconv.a ...
In file included from Entry.cpp:3:
/root/elfconv/bin/..//backend/remill/include/remill/Arch/Runtime/Intrinsics.h:70:44: warning: '__remill_undefined_f80' has C-linkage specified, but returns user-defined type 'float80_t' which is incompatible with C [-Wreturn-type-c-linkage]
70 | [[gnu::used, gnu::const]] extern float80_t __remill_undefined_f80(void);
| ^
1 warning generated.
In file included from VmIntrinsics.cpp:5:
/root/elfconv/bin/..//backend/remill/include/remill/Arch/Runtime/Intrinsics.h:70:44: warning: '__remill_undefined_f80' has C-linkage specified, but returns user-defined type 'float80_t' which is incompatible with C [-Wreturn-type-c-linkage]
70 | [[gnu::used, gnu::const]] extern float80_t __remill_undefined_f80(void);
| ^
1 warning generated.
[INFO] Generate libelfconv.a.
[INFO] Converting ELF to LLVM bitcode ...
./elflift --arch aarch64 --bc_out lift.bc --target_elf /root/elfconv/examples/hello/a.out --dbg_fun_cfg
terminate called after throwing an instance of 'std::runtime_error'
what(): [ERROR] "__libc_start_main@GLIBC_2.34" is included in multiple sections.
./elfconv.sh: line 60: 11199 Aborted (core dumped) ./elflift --arch aarch64 --bc_out lift.bc --target_elf "$ELFPATH" --dbg_fun_cfg "$2"
[INFO] Generate lift.bc.
[INFO] Converting LLVM bitcode to WASM binary and glue code (for browser) ...
emcc: error: lift.bc: No such file or directory ("lift.bc" was expected to be an input file, based on the commandline arguments provided)
[INFO] Generate WASM binary.
Did I miss something?
@jedisct1 Thank you for trying! First, elfconv cannot compile the dynamically linked or stripped binaries now, so unfortunately, I think you may fail to compile many ELF binaries placed in the directories of Ubuntu from the beginning. However, I will implement them in the future because those functions are important.
Second, to prevent the failing of ./elfconv.sh ../examples/hello/a.out
I placed the Makefile in the every examples/*
directory, and please try again after pulling the latest commit.
Thanks!
Thank you!
Hi,
I tried to run it, using the container image, but only got core dumps. Here's a transcript:
Is
/bin/echo
something that can't be converted to WebAssembly?