diff options
author | Petar Jovanovic <petar.jovanovic@mips.com> | 2019-02-05 22:23:46 +0000 |
---|---|---|
committer | Petar Jovanovic <petar.jovanovic@mips.com> | 2019-02-05 22:23:46 +0000 |
commit | b33f00f50841067a405c7c84d406d95ba1714958 (patch) | |
tree | 25bddb96a14b4c11d44560e7b78d969e298f1b3f | |
parent | 3349bd662aade8f8681e0849fd8dcba630a99e68 (diff) | |
download | bcm5719-llvm-b33f00f50841067a405c7c84d406d95ba1714958.tar.gz bcm5719-llvm-b33f00f50841067a405c7c84d406d95ba1714958.zip |
[elfabi] Fix the type of the variable formated for error output
Change the format type of Dyn.SONameOffset to PRIx64 since it is a uint64_t.
The problem was detected on mips builds, where it was printing junk values
and causing test failure.
Patch by Milos Stojanovic.
Differential Revision: https://reviews.llvm.org/D57676
llvm-svn: 353225
-rw-r--r-- | llvm/tools/llvm-elfabi/ELFObjHandler.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/tools/llvm-elfabi/ELFObjHandler.cpp b/llvm/tools/llvm-elfabi/ELFObjHandler.cpp index 8f3b76ccc89..a41fc19f56c 100644 --- a/llvm/tools/llvm-elfabi/ELFObjHandler.cpp +++ b/llvm/tools/llvm-elfabi/ELFObjHandler.cpp @@ -130,14 +130,16 @@ static Error populateDynamic(DynamicEntries &Dyn, if (Dyn.SONameOffset.hasValue() && *Dyn.SONameOffset >= Dyn.StrSize) { return createStringError( object_error::parse_failed, - "DT_SONAME string offset (0x%016x) outside of dynamic string table", + "DT_SONAME string offset (0x%016" PRIx64 + ") outside of dynamic string table", *Dyn.SONameOffset); } for (uint64_t Offset : Dyn.NeededLibNames) { if (Offset >= Dyn.StrSize) { return createStringError( object_error::parse_failed, - "DT_NEEDED string offset (0x%016x) outside of dynamic string table", + "DT_NEEDED string offset (0x%016" PRIx64 + ") outside of dynamic string table", Offset); } } |