[PATCH] D35208: [WebAssembly] Add more details to llvm-readobj for wasm files
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 10 13:47:46 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL307588: [WebAssembly] Add more details to llvm-readobj for wasm files (authored by sbc).
Repository:
rL LLVM
https://reviews.llvm.org/D35208
Files:
llvm/trunk/test/tools/llvm-readobj/sections.test
llvm/trunk/tools/llvm-readobj/WasmDumper.cpp
Index: llvm/trunk/tools/llvm-readobj/WasmDumper.cpp
===================================================================
--- llvm/trunk/tools/llvm-readobj/WasmDumper.cpp
+++ llvm/trunk/tools/llvm-readobj/WasmDumper.cpp
@@ -153,6 +153,12 @@
switch (WasmSec.Type) {
case wasm::WASM_SEC_CUSTOM:
W.printString("Name", WasmSec.Name);
+ if (WasmSec.Name == "linking") {
+ const wasm::WasmLinkingData &LinkingData = Obj->linkingData();
+ W.printNumber("DataSize", LinkingData.DataSize);
+ if (LinkingData.DataAlignment)
+ W.printNumber("DataAlignment", LinkingData.DataAlignment);
+ }
break;
case wasm::WASM_SEC_MEMORY:
ListScope Group(W, "Memories");
Index: llvm/trunk/test/tools/llvm-readobj/sections.test
===================================================================
--- llvm/trunk/test/tools/llvm-readobj/sections.test
+++ llvm/trunk/test/tools/llvm-readobj/sections.test
@@ -561,5 +561,7 @@
WASM-NEXT: Size: 22
WASM-NEXT: Offset: 257
WASM-NEXT: Name: linking
+WASM-NEXT: DataSize: 13
+WASM-NEXT: DataAlignment: 1
WASM-NEXT: }
WASM-NEXT: ]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35208.105920.patch
Type: text/x-patch
Size: 1145 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170710/339f8c8c/attachment.bin>
More information about the llvm-commits
mailing list