[PATCH] D57676: [elfabi] Fix the type of the variable formated for error output
Miloš Stojanović via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 4 02:23:06 PST 2019
mstojanovic created this revision.
mstojanovic added reviewers: amontanez, jakehehrlich, jhenderson, petarj, zoran.jovanovic.
Herald added subscribers: atanasyan, arichardson, sdardis.
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.
https://reviews.llvm.org/D57676
Files:
tools/llvm-elfabi/ELFObjHandler.cpp
Index: tools/llvm-elfabi/ELFObjHandler.cpp
===================================================================
--- tools/llvm-elfabi/ELFObjHandler.cpp
+++ tools/llvm-elfabi/ELFObjHandler.cpp
@@ -130,14 +130,16 @@
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);
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57676.185012.patch
Type: text/x-patch
Size: 929 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190204/79298a59/attachment.bin>
More information about the llvm-commits
mailing list