MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / GetRelocationInfo

Method GetRelocationInfo

arch/x86/arch_x86.cpp:4058–4084  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4056 }
4057
4058 virtual bool GetRelocationInfo(Ref<BinaryView> view, Ref<Architecture> arch, vector<BNRelocationInfo>& result) override
4059 {
4060 (void)view; (void)arch;
4061 set<uint64_t> relocTypes;
4062 for (size_t i = 0; i < result.size(); i++)
4063 {
4064 result[i].type = StandardRelocationType;
4065 switch (result[i].nativeType)
4066 {
4067 case GENERIC_RELOC_VANILLA:
4068 if (result[i].size != 4)
4069 {
4070 result[i].type = IgnoredRelocation;
4071 relocTypes.insert(result[i].nativeType);
4072 }
4073 break;
4074 default:
4075 result[i].type = UnhandledRelocation;
4076 relocTypes.insert(result[i].nativeType);
4077 break;
4078 }
4079 }
4080
4081 for (auto& reloc : relocTypes)
4082 LogWarn("Unsupported Mach-O relocation type: %s", GetRelocationString((Machox86RelocationType)reloc));
4083 return true;
4084 }
4085};
4086
4087class x86ElfRelocationHandler: public RelocationHandler

Callers

nothing calls this directly

Calls 3

GetRelocationStringFunction · 0.70
sizeMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected