mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-26 01:39:11 +00:00
[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) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user