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 | 4df5d7647719b06682af1d45f732ce86912ca956 (patch) | |
| tree | cd898c58a2a6797c7083890e7717b0d50772e21b /llvm/lib/Object | |
| parent | 5805d9e9ac5d6d4e02cb2be0499658cd64fc3fe7 (diff) | |
| download | bcm5719-llvm-4df5d7647719b06682af1d45f732ce86912ca956.tar.gz bcm5719-llvm-4df5d7647719b06682af1d45f732ce86912ca956.zip | |
[WebAssembly] Add support for printing relocations with llvm-objdump
Differential Revision: https://reviews.llvm.org/D34658
llvm-svn: 306461
Diffstat (limited to 'llvm/lib/Object')
| -rw-r--r-- | llvm/lib/Object/WasmObjectFile.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Object/WasmObjectFile.cpp b/llvm/lib/Object/WasmObjectFile.cpp index e87dd48cb01..fff497ba556 100644 --- a/llvm/lib/Object/WasmObjectFile.cpp +++ b/llvm/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()); |

