[PATCH] D70970: [llvm-objcopy][WebAssembly] Add dump/add/remove-section support

Derek Schuff via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 11 15:17:15 PST 2020


dschuff marked 2 inline comments as done.
dschuff added inline comments.


================
Comment at: llvm/test/tools/llvm-objcopy/wasm/add-section.test:2
+## Test --add-section. This test dumps and removes the section first and checks
+## that adding it back doesn't change the result.
+# RUN: yaml2obj %s -o %t
----------------
sbc100 wrote:
> Would it be worth checking that the initial and final objects are byte-for-byte identical somehow?
Currently they aren't identical because they don't encode all of the LEBs identically. 
Also obj2yaml puts the reloc.CODE section at the end after the producers section, but it gets added to the end by objcopy. So currently it's not actually a goal to have them be bit-identical. If we wanted we could do that in a future patch.


================
Comment at: llvm/utils/gn/secondary/llvm/tools/llvm-objcopy/BUILD.gn:75
     "llvm-objcopy.cpp",
+    "wasm/Object.cpp",
     "wasm/Reader.cpp",
----------------
sbc100 wrote:
> Is it now the expectation that we update .gn files along with cmake?   (BTW, do you use gn locally?)
No, that is explicitly not an expectation (https://github.com/llvm/llvm-project/blob/master/llvm/utils/gn/README.rst). But I do sometimes use GN, so I ended up doing it in this case.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70970/new/

https://reviews.llvm.org/D70970





More information about the llvm-commits mailing list