summaryrefslogtreecommitdiff
path: root/ELFLoader
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2018-10-31 20:10:39 +0100
committerAndreas Kling <awesomekling@gmail.com>2018-10-31 20:14:23 +0100
commitdec5683e9c5edd9259e2bcebc2b5804d1fdd4082 (patch)
treeaff2f7d2096621ea076464d4b527fe51b022cd17 /ELFLoader
parent9886b27d9cc67221efc8ee7e277570d146ee9992 (diff)
downloadserenity-dec5683e9c5edd9259e2bcebc2b5804d1fdd4082.zip
Snazz up the kprintf() output a bit by giving it its own color.
Diffstat (limited to 'ELFLoader')
-rw-r--r--ELFLoader/ELFLoader.cpp14
-rw-r--r--ELFLoader/ExecSpace.cpp2
2 files changed, 8 insertions, 8 deletions
diff --git a/ELFLoader/ELFLoader.cpp b/ELFLoader/ELFLoader.cpp
index a4b4614e16..5bac37265e 100644
--- a/ELFLoader/ELFLoader.cpp
+++ b/ELFLoader/ELFLoader.cpp
@@ -37,7 +37,7 @@ bool ELFLoader::load()
bool ELFLoader::layout()
{
#ifdef ELFLOADER_DEBUG
- kprintf("[ELFLoader] Layout\n");
+ kprintf("ELFLoader: Layout\n");
#endif
bool failed = false;
dword highestOffset = 0;
@@ -49,13 +49,13 @@ bool ELFLoader::layout()
}
});
#ifdef ELFLOADER_DEBUG
- kprintf("[ELFLoader] Highest section offset: %u, Size needed: %u\n", highestOffset, sizeNeeded);
+ kprintf("ELFLoader: Highest section offset: %u, Size needed: %u\n", highestOffset, sizeNeeded);
#endif
m_execSpace.allocateUniverse(sizeNeeded);
m_image->forEachSectionOfType(SHT_PROGBITS, [this, &failed] (const ELFImage::Section& section) {
#ifdef ELFLOADER_DEBUG
- kprintf("[ELFLoader] Allocating progbits section: %s\n", section.name());
+ kprintf("ELFLoader: Allocating progbits section: %s\n", section.name());
#endif
if (!section.size())
return true;
@@ -71,7 +71,7 @@ bool ELFLoader::layout()
});
m_image->forEachSectionOfType(SHT_NOBITS, [this, &failed] (const ELFImage::Section& section) {
#ifdef ELFLOADER_DEBUG
- kprintf("[ELFLoader] Allocating nobits section: %s\n", section.name());
+ kprintf("ELFLoader: Allocating nobits section: %s\n", section.name());
#endif
if (!section.size())
return true;
@@ -111,7 +111,7 @@ char* ELFLoader::areaForSectionName(const char* name)
bool ELFLoader::performRelocations()
{
#ifdef ELFLOADER_DEBUG
- kprintf("[ELFLoader] Performing relocations\n");
+ kprintf("ELFLoader: Performing relocations\n");
#endif
bool failed = false;
@@ -134,7 +134,7 @@ bool ELFLoader::performRelocations()
}
ptrdiff_t relativeOffset = (char*)targetPtr - ((char*)&patchPtr + 4);
#ifdef ELFLOADER_DEBUG
- kprintf("[ELFLoader] Relocate PC32: offset=%x, symbol=%u(%s) value=%x target=%p, offset=%d\n",
+ kprintf("ELFLoader: Relocate PC32: offset=%x, symbol=%u(%s) value=%x target=%p, offset=%d\n",
relocation.offset(),
symbol.index(),
symbol.name(),
@@ -148,7 +148,7 @@ bool ELFLoader::performRelocations()
}
case R_386_32: {
#ifdef ELFLOADER_DEBUG
- kprintf("[ELFLoader] Relocate Abs32: symbol=%u(%s), value=%x, section=%s\n",
+ kprintf("ELFLoader: Relocate Abs32: symbol=%u(%s), value=%x, section=%s\n",
symbol.index(),
symbol.name(),
symbol.value(),
diff --git a/ELFLoader/ExecSpace.cpp b/ELFLoader/ExecSpace.cpp
index 9a751495e0..135627db38 100644
--- a/ELFLoader/ExecSpace.cpp
+++ b/ELFLoader/ExecSpace.cpp
@@ -46,7 +46,7 @@ bool ExecSpace::loadELF(MappedFile&& file)
if (!loader.load())
return false;
#ifdef EXECSPACE_DEBUG
- kprintf("[ExecSpace] ELF loaded, symbol map now:\n");
+ kprintf("ExecSpace: ELF loaded, symbol map now:\n");
for (auto& s : m_symbols) {
kprintf("> %p: %s (%u)\n",
s.value.ptr,