Skip to content

Commit b48e41b

Browse files
committed
[llvm-objdump] Fix End in disassemblyObject after rL358806
llvm-svn: 358809
1 parent 2e33f8d commit b48e41b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,9 +1153,9 @@ static void disassembleObject(const Target *TheTarget, const ObjectFile *Obj,
11531153

11541154
// The end is the section end, the beginning of the next symbol, or
11551155
// --stop-address.
1156-
uint64_t End = std::min<uint64_t>(
1157-
SI + 1 < SE ? std::get<0>(Symbols[SI + 1]) : SectionAddr + SectSize,
1158-
StopAddress);
1156+
uint64_t End = std::min<uint64_t>(SectionAddr + SectSize, StopAddress);
1157+
if (SI + 1 < SE)
1158+
End = std::min(End, std::get<0>(Symbols[SI + 1]));
11591159
if (Start >= End || End <= StartAddress)
11601160
continue;
11611161
Start -= SectionAddr;

0 commit comments

Comments
 (0)