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

Move ELFLoader debug output behind flags.

The logging spam was out of control.
This commit is contained in:
Andreas Kling 2018-10-23 11:03:26 +02:00
parent fe237ee215
commit 56ed448424
3 changed files with 29 additions and 1 deletions

View file

@ -180,12 +180,16 @@ const ELFImage::RelocationSection ELFImage::Section::relocations() const
char relocationSectionName[128];
int x = ksprintf(relocationSectionName, ".rel%s", name());
#ifdef ELFIMAGE_DEBUG
kprintf("looking for '%s'\n", relocationSectionName);
#endif
auto relocationSection = m_image.lookupSection(relocationSectionName);
if (relocationSection.type() != SHT_REL)
return static_cast<const RelocationSection>(m_image.section(0));
#ifdef ELFIMAGE_DEBUG
kprintf("Found relocations for %s in %s\n", name(), relocationSection.name());
#endif
return static_cast<const RelocationSection>(relocationSection);
}