Sam Clegg
Sam Clegg
@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...
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...
The file that you attached seems to be an ELF file not a wasm file.
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...
That library looks pretty odd: ``` $ ar t lib.a / // linked_list.o frame.o cs101_asdu.o cs101_bcr.o � cs101_master.o cs101_queue.o cs101_slave.o � cs104_frame.o cs104_slave.o buffer_frame.o link_layer.o � cpXXtime2a.o socket_bsd.o thread_bsd.o time.o...
I think somehow your archive files are corrupted, or at least not created using the normal emar / llvm-ar tools. I was able to reproduce the section too large by...
``` $ wasm-validate tmp/cs101_bcr.o 00017c7: error: multiple Code sections ```
The error message seems to suggest that fgcc is required, but emcc is based on clang. Perhaps file a bug with openjdk and ask them if its possible to build...
I think this has still no yet been resolved fully.. tools like qtcreator and others are still a little confused about how to find emscripten correctly.
@agnickolov we should really put `webidl_binder` and `file_packager` into the `PATH`. But for now you can find `webidl_binder` but looking up `emcc` in the `PATH`. e.g. ``` emcc = shutil.which('emcc')...