summaryrefslogtreecommitdiff
path: root/arch/powerpc
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2025-12-05 17:26:55 -0500
committerMason Reed <35282038+emesare@users.noreply.github.com>2025-12-29 10:14:48 -0500
commit6bfb18962ba4f3317a7944a4ed6f45f468690a3e (patch)
treec89f69b602d84168421e0070b1e4917b4312e375 /arch/powerpc
parent9dbc09db3ad16db41cddcd98258c00c829924270 (diff)
Use session scoped logger instance for unhandled relocation information
Ran into this when running over certain object files on ppc, we can do it for all of them though.
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/arch_ppc.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/powerpc/arch_ppc.cpp b/arch/powerpc/arch_ppc.cpp
index a1605923..d806e0f6 100644
--- a/arch/powerpc/arch_ppc.cpp
+++ b/arch/powerpc/arch_ppc.cpp
@@ -2469,7 +2469,8 @@ public:
virtual bool GetRelocationInfo(Ref<BinaryView> view, Ref<Architecture> arch, vector<BNRelocationInfo>& result) override
{
- (void)view; (void)arch; (void)result;
+ (void)arch; (void)result;
+ Ref<Logger> logger = view->CreateLogger("PpcElfReloc");
set<uint64_t> relocTypes;
for (auto& reloc : result)
{
@@ -2526,7 +2527,7 @@ public:
}
}
for (auto& reloc : relocTypes)
- LogWarn("Unsupported ELF relocation type: %s", GetRelocationString((ElfPpcRelocationType)reloc));
+ logger->LogWarn("Unsupported ELF relocation type: %s", GetRelocationString((ElfPpcRelocationType)reloc));
return true;
}
@@ -2555,7 +2556,8 @@ class PpcMachoRelocationHandler: public RelocationHandler
public:
virtual bool GetRelocationInfo(Ref<BinaryView> view, Ref<Architecture> arch, vector<BNRelocationInfo>& result) override
{
- (void)view; (void)arch;
+ (void)arch;
+ Ref<Logger> logger = view->CreateLogger("PpcMachoReloc");
set<uint64_t> relocTypes;
for (auto& reloc : result)
{
@@ -2563,7 +2565,7 @@ public:
relocTypes.insert(reloc.nativeType);
}
for (auto& reloc : relocTypes)
- LogWarn("Unsupported Mach-O relocation type: %s", GetRelocationString((MachoPpcRelocationType)reloc));
+ logger->LogWarn("Unsupported Mach-O relocation type: %s", GetRelocationString((MachoPpcRelocationType)reloc));
return false;
}
};