Open goodspeed1986 opened 3 weeks ago
This sounds like an LLVM issue, but @sbc100 might have a quick answer.
I'd guess this might be the code or the data section that is too large. @sbc100 is there a way to tell?
If it is code or data, then @goodspeed1986 optimizations might work around the issue. Perhaps adding -Oz
somewhere in the build system could help.
@goodspeed1986, is it possible for you to attach linked_list.o to this issue? Based on its name I assume it implements a linked list, which should not be large in code or data size.. so something strange may be going on.
Indeed, this error comes from a malformed input, not from a valid but large section: https://github.com/llvm/llvm-project/blob/2599d695128381e6932b43f0e95649c533308d6d/llvm/lib/Object/WasmObjectFile.cpp#L321-L323
Specifcally it looks like it only happens when the section extents beyond the end of the file. So linked_list.o
seems to be malformed in some way. Could you share the full command you used to build it? And the object itself if possible.
@sbc100 I also wonder what are the limits for the section sizes in wasm binaries :) (for the case of embedding data blobs into the wasm binary)
I am attaching the file linked_list.o linked_list.zip
The file that you attached seems to be an ELF file not a wasm file.
Sorry. Try this. linked_list.zip
That linked_list.o seems perfectly fine, and wasm-ld seems to accept it just fine without error.
Can you perhaps attach the whole library that contains linked_list.o
or better still the result of running emcc with -Wl,--reproduce=repro.tar
?
liblib60870.zip Can i call functions from this library directly without c application?
Hello. I have compiled the iec60870 library (https://github.com/mz-automation/lib60870) using emmake. When I try to compile my application that uses this library using emcc
I get a [wasm-ld error](wasm-ld: error: linked_list.o: section too large).
Is it possible to somehow solve this problem?
emcc -v emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.64-git clang version 19.0.0git Target: wasm32-unknown-emscripten Thread model: posix InstalledDir: /opt/homebrew/Cellar/emscripten/3.1.64/libexec/llvm/bin