diff options
author | Sam Clegg <sbc@chromium.org> | 2017-06-27 20:40:53 +0000 |
---|---|---|
committer | Sam Clegg <sbc@chromium.org> | 2017-06-27 20:40:53 +0000 |
commit | 08da5c5be51b5be2f5d382a75d7f02fd9f4589d1 (patch) | |
tree | fe05e8144f9b6724747bb58de63e19852d253f0d /lib/Object | |
parent | 49ab5d599222f7dd82c73e09d5a420c7c640ac59 (diff) |
[WebAssembly] Add support for printing relocations with llvm-objdump
Differential Revision: https://reviews.llvm.org/D34658
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306461 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Object')
-rw-r--r-- | lib/Object/WasmObjectFile.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Object/WasmObjectFile.cpp b/lib/Object/WasmObjectFile.cpp index e87dd48cb01f..fff497ba5564 100644 --- a/lib/Object/WasmObjectFile.cpp +++ b/lib/Object/WasmObjectFile.cpp @@ -294,6 +294,7 @@ Error WasmObjectFile::parseNameSection(const uint8_t *Ptr, const uint8_t *End) { Error WasmObjectFile::parseLinkingSection(const uint8_t *Ptr, const uint8_t *End) { + HasLinkingSection = true; while (Ptr < End) { uint8_t Type = readVarint7(Ptr); uint32_t Size = readVaruint32(Ptr); @@ -950,7 +951,9 @@ SubtargetFeatures WasmObjectFile::getFeatures() const { return SubtargetFeatures(); } -bool WasmObjectFile::isRelocatableObject() const { return false; } +bool WasmObjectFile::isRelocatableObject() const { + return HasLinkingSection; +} const WasmSection &WasmObjectFile::getWasmSection(DataRefImpl Ref) const { assert(Ref.d.a < Sections.size()); |