1@section WebAssembly backend 2The WebAssembly module file format, at present, is a very simple 3object file format with up to 11 numbered sections plus named 4``custom'' sections. At present, there is no standard for relocations 5or symbols, though a @code{"name"} subsection can assign names to 6function indices and local variables. 7 8As such, it offers no real advantages over ELF, and intermediate ELF 9files can be used to produce WebAssembly modules. The WebAssembly 10backend aims to enable the opposite: reading a WebAssembly module and 11producing an ELF file containing the same information, which can then 12be manipulated and inspected with standard tools. 13 14When writing WebAssembly modules, the WebAssembly backend attempts to 15determine based on the section name whether to use a numeric section 16id, a named section header, or to include the section verbatim, 17assuming it already contains any necessary header. 18 19Function names are supported as symbols; local names and WebAssembly 20relocation sections are currently unsupported. 21 22There are slight differences in the LEB128 integer implementations 23between the WebAssembly specification and the BFD code; these result 24in some malformed WebAssembly modules being treated as valid. 25 26@menu 27* File layout:: 28@end menu 29 30@node File layout, WebAssembly 31@subsection File layout 32For a description of the WebAssembly file format, see 33@url{https://github.com/WebAssembly/design/blob/master/BinaryEncoding.md}. 34