gimli-rs / object

A unified interface for reading and writing object file formats
https://docs.rs/object/
Apache License 2.0
664 stars 151 forks source link

Wasm relocations? #739

Closed Cr0a3 closed 2 hours ago

Cr0a3 commented 3 hours ago

Hi, I want to construct wasm object files using object (does the object libary support wasm?). If it does support wasm, how can i access the: R_WASM_FUNCTION_INDEX_LEB- relocation kind?

Bye

bjorn3 commented 3 hours ago

The object crate doesn't support writing wasm. For that something like the wasm-encoder crate (low level) or the waffle or walrus crate (high level) is necessary. Neither supports writing wasm object files though I think, only complete already linked wasm modules. The structure of wasm files is way too different to be able to fit it into the generic object file writer interface of the object crate.

Cr0a3 commented 2 hours ago

Ok thanks