summaryrefslogtreecommitdiff
path: root/arch/armv7
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/armv7
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/armv7')
-rw-r--r--arch/armv7/arch_armv7.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/armv7/arch_armv7.cpp b/arch/armv7/arch_armv7.cpp
index c422d7f0..fdd1bad7 100644
--- a/arch/armv7/arch_armv7.cpp
+++ b/arch/armv7/arch_armv7.cpp
@@ -2497,8 +2497,8 @@ public:
virtual bool GetRelocationInfo(Ref<BinaryView> view, Ref<Architecture> arch, vector<BNRelocationInfo>& result) override
{
- (void)view;
(void)arch;
+ Ref<Logger> logger = view->CreateLogger("ArmElfReloc");
set<uint64_t> relocTypes;
for (auto& reloc: result)
{
@@ -2670,7 +2670,7 @@ public:
}
}
for (auto& reloc : relocTypes)
- LogWarn("Unsupported ELF relocation: %s", GetRelocationString((ElfArmRelocationType)reloc));
+ logger->LogWarn("Unsupported ELF relocation: %s", GetRelocationString((ElfArmRelocationType)reloc));
return true;
}
};
@@ -2693,8 +2693,8 @@ public:
virtual bool GetRelocationInfo(Ref<BinaryView> view, Ref<Architecture> arch, vector<BNRelocationInfo>& result) override
{
- (void)view;
(void)arch;
+ Ref<Logger> logger = view->CreateLogger("ArmMachoReloc");
set<uint64_t> relocTypes;
for (auto& reloc: result)
{
@@ -2702,7 +2702,7 @@ public:
relocTypes.insert(reloc.nativeType);
}
for (auto& reloc : relocTypes)
- LogWarn("Unsupported Mach-O relocation %s", GetRelocationString((MachoArmRelocationType)reloc));
+ logger->LogWarn("Unsupported Mach-O relocation %s", GetRelocationString((MachoArmRelocationType)reloc));
return false;
};
};
@@ -2745,8 +2745,8 @@ public:
virtual bool GetRelocationInfo(Ref<BinaryView> view, Ref<Architecture> arch, vector<BNRelocationInfo>& result) override
{
- (void)view;
(void)arch;
+ Ref<Logger> logger = view->CreateLogger("ArmPeReloc");
set<uint64_t> relocTypes;
for (auto& reloc: result)
{
@@ -2775,7 +2775,7 @@ public:
}
}
for (auto& reloc : relocTypes)
- LogWarn("Unsupported PE relocation %s", GetRelocationString((PeRelocationType)reloc));
+ logger->LogWarn("Unsupported PE relocation %s", GetRelocationString((PeRelocationType)reloc));
return false;
}
@@ -3162,8 +3162,8 @@ public:
virtual bool GetRelocationInfo(Ref<BinaryView> view, Ref<Architecture> arch, vector<BNRelocationInfo>& result) override
{
- (void)view;
(void)arch;
+ Ref<Logger> logger = view->CreateLogger("ArmCoffReloc");
set<uint64_t> relocTypes;
for (auto& reloc: result)
{
@@ -3236,7 +3236,7 @@ public:
}
}
for (auto& reloc : relocTypes)
- LogWarn("Unsupported COFF relocation %s", GetRelocationString((PeArmRelocationType)reloc));
+ logger->LogWarn("Unsupported COFF relocation %s", GetRelocationString((PeArmRelocationType)reloc));
return true;
}
};