forked from OSchip/llvm-project
[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:
parent
3349bd662a
commit
b33f00f508
|
@ -130,14 +130,16 @@ static Error populateDynamic(DynamicEntries &Dyn,
|
||||||
if (Dyn.SONameOffset.hasValue() && *Dyn.SONameOffset >= Dyn.StrSize) {
|
if (Dyn.SONameOffset.hasValue() && *Dyn.SONameOffset >= Dyn.StrSize) {
|
||||||
return createStringError(
|
return createStringError(
|
||||||
object_error::parse_failed,
|
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);
|
*Dyn.SONameOffset);
|
||||||
}
|
}
|
||||||
for (uint64_t Offset : Dyn.NeededLibNames) {
|
for (uint64_t Offset : Dyn.NeededLibNames) {
|
||||||
if (Offset >= Dyn.StrSize) {
|
if (Offset >= Dyn.StrSize) {
|
||||||
return createStringError(
|
return createStringError(
|
||||||
object_error::parse_failed,
|
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);
|
Offset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue