| 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 | |
| 4087 | class x86ElfRelocationHandler: public RelocationHandler |
nothing calls this directly
no test coverage detected