[PATCH] D42233: Better support for WASM Object format
Patrick Cheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 18 00:52:00 PST 2018
patcheng created this revision.
Herald added subscribers: llvm-commits, sunfish, aheejin, sbc100, jfb.
Addressed https://bugs.llvm.org/show_bug.cgi?id=35928
WasmObjectFile::section() now exposes WasmDataSegments as sections
so that when Clang iterates through the sections, it wil find the
WasmDataSegments.
When writing WasmDataSegments, now make sure
individual WasmDataSegments are aligned by padding extra zeros.
When reading, checks for alignment and skips the padding.
Previously, alignment only happens for the DataSection itself. The Data Segment were not aligned.
It does mean that it won't be able to read old WASM if alignments were set.
Also, noticed that WasmObjectFile implemented isSectionBitcode() to always returned false.
ELFObjectFile didn't implement that method, and the default implementation in ObjectFile just
checks for SectionName. Should follow ELFObjectFile?
Repository:
rL LLVM
https://reviews.llvm.org/D42233
Files:
include/llvm/Object/Wasm.h
lib/MC/WasmObjectWriter.cpp
lib/Object/WasmObjectFile.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42233.130365.patch
Type: text/x-patch
Size: 5732 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180118/525fe1ff/attachment.bin>
More information about the llvm-commits
mailing list