diff --git a/llvm/tools/llvm-readobj/ELFDumper.cpp b/llvm/tools/llvm-readobj/ELFDumper.cpp --- a/llvm/tools/llvm-readobj/ELFDumper.cpp +++ b/llvm/tools/llvm-readobj/ELFDumper.cpp @@ -3775,7 +3775,7 @@ if (!Fields[4].Str.empty()) { if (RelAddend < 0) { Addend = " - "; - RelAddend = std::abs(RelAddend); + RelAddend = -(uint64_t)RelAddend; } else { Addend = " + "; }