[llvm-objdump] - Restore a piece of code removed by mistake in r352366.
authorGeorge Rimar <grimar@accesssoftek.com>
Mon, 28 Jan 2019 16:36:12 +0000 (16:36 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Mon, 28 Jan 2019 16:36:12 +0000 (16:36 +0000)
Seems when committed the r352366
("[llvm-objdump] - Print LMAs when dumping section headers.")
I resolved merge conflict incorrectly and removed this piece by mistake.

Bots did not catch this yet, seems they are slow today,
but the `X86/adjust-vma.test` test case fails locally for me without that.

llvm-svn: 352383

llvm/tools/llvm-objdump/llvm-objdump.cpp

index 1ba0cfc..87ed8bb 100644 (file)
@@ -1547,6 +1547,9 @@ void llvm::printSectionHeaders(const ObjectFile *Obj) {
     StringRef Name;
     error(Section.getName(Name));
     uint64_t VMA = Section.getAddress();
+    if (shouldAdjustVA(Section))
+      VMA += AdjustVMA;
+
     uint64_t Size = Section.getSize();
     bool Text = Section.isText();
     bool Data = Section.isData();