1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 10:27:34 +00:00

printf format fixups in ELFLoader.

This commit is contained in:
Andreas Kling 2018-10-22 00:29:35 +02:00
parent 09fc9c0698
commit df4fdd6f1e
2 changed files with 5 additions and 5 deletions

View file

@ -47,7 +47,7 @@ unsigned ELFImage::symbolCount() const
void ELFImage::dump() void ELFImage::dump()
{ {
kprintf("AK::ELFImage{%p} {\n", this); kprintf("ELFImage{%p} {\n", this);
kprintf(" isValid: %u\n", isValid()); kprintf(" isValid: %u\n", isValid());
if (!isValid()) { if (!isValid()) {
@ -57,7 +57,7 @@ void ELFImage::dump()
kprintf(" type: %s\n", objectFileTypeToString(header().e_type)); kprintf(" type: %s\n", objectFileTypeToString(header().e_type));
kprintf(" machine: %u\n", header().e_machine); kprintf(" machine: %u\n", header().e_machine);
kprintf(" entry: %08x\n", header().e_entry); kprintf(" entry: %x\n", header().e_entry);
kprintf(" shoff: %u\n", header().e_shoff); kprintf(" shoff: %u\n", header().e_shoff);
kprintf(" shnum: %u\n", header().e_shnum); kprintf(" shnum: %u\n", header().e_shnum);
kprintf(" shstrndx: %u\n", header().e_shstrndx); kprintf(" shstrndx: %u\n", header().e_shstrndx);
@ -79,7 +79,7 @@ void ELFImage::dump()
kprintf("Symbol @%u:\n", i); kprintf("Symbol @%u:\n", i);
kprintf(" Name: %s\n", sym.name()); kprintf(" Name: %s\n", sym.name());
kprintf(" In section: %s\n", sectionIndexToString(sym.sectionIndex())); kprintf(" In section: %s\n", sectionIndexToString(sym.sectionIndex()));
kprintf(" Value: %08x\n", sym.value()); kprintf(" Value: %x\n", sym.value());
kprintf(" Size: %u\n", sym.size()); kprintf(" Size: %u\n", sym.size());
} }

View file

@ -75,7 +75,7 @@ void ELFLoader::performRelocations()
case R_386_PC32: { case R_386_PC32: {
char* targetPtr = (char*)lookup(symbol); char* targetPtr = (char*)lookup(symbol);
ptrdiff_t relativeOffset = (char*)targetPtr - ((char*)&patchPtr + 4); ptrdiff_t relativeOffset = (char*)targetPtr - ((char*)&patchPtr + 4);
kprintf("[ELFLoader] Relocate PC32: offset=%08x, symbol=%u(%s) value=%08x target=%p, offset=%d\n", kprintf("[ELFLoader] Relocate PC32: offset=%x, symbol=%u(%s) value=%x target=%p, offset=%d\n",
relocation.offset(), relocation.offset(),
symbol.index(), symbol.index(),
symbol.name(), symbol.name(),
@ -87,7 +87,7 @@ void ELFLoader::performRelocations()
break; break;
} }
case R_386_32: { case R_386_32: {
kprintf("[ELFLoader] Relocate Abs32: symbol=%u(%s), value=%08x, section=%s\n", kprintf("[ELFLoader] Relocate Abs32: symbol=%u(%s), value=%x, section=%s\n",
symbol.index(), symbol.index(),
symbol.name(), symbol.name(),
symbol.value(), symbol.value(),