[PATCH] D126509: [Objcopy][Wasm] Allow selecting known sections by name

Derek Schuff via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 26 16:54:45 PDT 2022


dschuff created this revision.
dschuff added reviewers: sbc100, aheejin.
Herald added subscribers: pmatos, asb, wingo, abrachet, sunfish, hiraditya.
Herald added a reviewer: alexander-shaposhnikov.
Herald added a reviewer: rupprecht.
Herald added a reviewer: jhenderson.
Herald added a project: All.
dschuff requested review of this revision.
Herald added subscribers: llvm-commits, MaskRay.
Herald added a project: LLVM.

Currently, only custom sections can be selected by operations that use section
names, because only custom sections have explicit names (whereas known sections
have names defined by the spec and only use their indices in the binary format).
This CL makes objdopy use the spec-defined names for these sections, allowing
them to be used in operations such as dumping and removal.

This is a prerequisite for fixing
https://github.com/emscripten-core/emscripten/issues/13084


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D126509

Files:
  llvm/include/llvm/BinaryFormat/Wasm.h
  llvm/lib/BinaryFormat/Wasm.cpp
  llvm/lib/ObjCopy/wasm/WasmReader.cpp
  llvm/test/tools/llvm-objcopy/wasm/dump-section.test
  llvm/test/tools/llvm-objcopy/wasm/only-keep-debug.test
  llvm/test/tools/llvm-objcopy/wasm/remove-section.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126509.432420.patch
Type: text/x-patch
Size: 4888 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220526/0ecc6e5d/attachment.bin>


More information about the llvm-commits mailing list