[llvm] r307588 - [WebAssembly] Add more details to llvm-readobj for wasm files
Sam Clegg via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 10 13:47:12 PDT 2017
Author: sbc
Date: Mon Jul 10 13:47:12 2017
New Revision: 307588
URL: http://llvm.org/viewvc/llvm-project?rev=307588&view=rev
Log:
[WebAssembly] Add more details to llvm-readobj for wasm files
Differential Revision: https://reviews.llvm.org/D35208
Modified:
llvm/trunk/test/tools/llvm-readobj/sections.test
llvm/trunk/tools/llvm-readobj/WasmDumper.cpp
Modified: llvm/trunk/test/tools/llvm-readobj/sections.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/sections.test?rev=307588&r1=307587&r2=307588&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-readobj/sections.test (original)
+++ llvm/trunk/test/tools/llvm-readobj/sections.test Mon Jul 10 13:47:12 2017
@@ -561,5 +561,7 @@ WASM-NEXT: Type: CUSTOM (0x0)
WASM-NEXT: Size: 22
WASM-NEXT: Offset: 257
WASM-NEXT: Name: linking
+WASM-NEXT: DataSize: 13
+WASM-NEXT: DataAlignment: 1
WASM-NEXT: }
WASM-NEXT: ]
Modified: llvm/trunk/tools/llvm-readobj/WasmDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/WasmDumper.cpp?rev=307588&r1=307587&r2=307588&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-readobj/WasmDumper.cpp (original)
+++ llvm/trunk/tools/llvm-readobj/WasmDumper.cpp Mon Jul 10 13:47:12 2017
@@ -153,6 +153,12 @@ void WasmDumper::printSections() {
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");
More information about the llvm-commits
mailing list