[all-commits] [llvm/llvm-project] 9fdc38: [WebAssembly][Object] Support more elem segment fl...

Derek Schuff via All-commits all-commits at lists.llvm.org
Fri Jan 17 17:27:06 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9fdc38c81c7d1b61cb0750e5f5b273d6d1877513
      https://github.com/llvm/llvm-project/commit/9fdc38c81c7d1b61cb0750e5f5b273d6d1877513
  Author: Derek Schuff <dschuff at chromium.org>
  Date:   2025-01-17 (Fri, 17 Jan 2025)

  Changed paths:
    M lld/wasm/SyntheticSections.cpp
    M llvm/include/llvm/BinaryFormat/Wasm.h
    M llvm/lib/MC/WasmObjectWriter.cpp
    M llvm/lib/Object/WasmObjectFile.cpp
    M llvm/lib/ObjectYAML/WasmEmitter.cpp
    M llvm/lib/ObjectYAML/WasmYAML.cpp
    M llvm/test/Object/Inputs/WASM/multi-table.wasm

  Log Message:
  -----------
  [WebAssembly][Object] Support more elem segment flags (#123427)

Some tools (e.g. Rust tooling) produce element segment descriptors with
neither
elemkind or element type descriptors, but with init exprs instead of
func indices
(this is with the flags value of 4 in

https://webassembly.github.io/spec/core/binary/modules.html#element-section).
LLVM doesn't fully model reference types or the various ways to
initialize element
segments, but we do want to correctly parse and skip over all type
sections, so
this change updates the object parser to handle that case, and refactors
for more
clarity.

The test file is updated to include one additional elem segment with a
flags value
of 4, an initializer value of (32.const 0) and an empty vector. 

Also support parsing files that export imported (undefined) functions.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list