[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
This commit is contained in:
Petar Jovanovic 2019-02-05 22:23:46 +00:00
parent 3349bd662a
commit b33f00f508

View File

@ -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);
}
}