[PATCH] D54924: [WebAssembly] Check if the section order is correct
Sam Clegg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 14 08:57:49 PST 2018
sbc100 added inline comments.
================
Comment at: lib/Object/WasmObjectFile.cpp:278
+ uint32_t SecType = peakUint8(Ctx);
+ if (!Checker.isValidSectionOrder(SecType)) {
+ Err = make_error<StringError>("Out of order section type: " +
----------------
If this is only passing the section type, not the section name, I can't see how it can check the ordering for custom sections?
Should we move this change down in "parseSection" so it can access the name and ID of custom sections?
================
Comment at: lib/Object/WasmObjectFile.cpp:1454
+ .Case("name", WASM_SEC_ORDER_NAME)
+ .Case("producers", WASM_SEC_ORDER_PRODUCERS)
+ .Default(-1);
----------------
We also have "dylink" section which must come first before any other section.
================
Comment at: tools/yaml2obj/CMakeLists.txt:2
set(LLVM_LINK_COMPONENTS
+ BinaryFormat
DebugInfoCodeView
----------------
Is this change still needed?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54924/new/
https://reviews.llvm.org/D54924
More information about the llvm-commits
mailing list