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

Function GetRelocationString

arch/powerpc/arch_ppc.cpp:149–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147};
148
149static const char* GetRelocationString(MachoPpcRelocationType relocType)
150{
151 static const char* relocTable[] =
152 {
153 "PPC_RELOC_VANILLA",
154 "PPC_RELOC_PAIR",
155 "PPC_RELOC_BR14",
156 "PPC_RELOC_BR24",
157 "PPC_RELOC_HI16",
158 "PPC_RELOC_LO16",
159 "PPC_RELOC_HA16",
160 "PPC_RELOC_LO14",
161 "PPC_RELOC_SECTDIFF",
162 "PPC_RELOC_PB_LA_PTR",
163 "PPC_RELOC_HI16_SECTDIFF",
164 "PPC_RELOC_LO16_SECTDIFF",
165 "PPC_RELOC_HA16_SECTDIFF",
166 "PPC_RELOC_JBSR",
167 "PPC_RELOC_LO14_SECTDIFF",
168 "PPC_RELOC_LOCAL_SECTDIFF"
169 };
170 if (relocType >= PPC_RELOC_VANILLA && relocType < MAX_MACHO_PPC_RELOCATION)
171 return relocTable[relocType];
172 return "Unknown PPC relocation";
173}
174
175#define HA(x) (uint16_t)((((x) >> 16) + (((x) & 0x8000) ? 1 : 0)) & 0xffff)
176

Callers 2

GetRelocationInfoMethod · 0.70
GetRelocationInfoMethod · 0.70

Calls 1

countMethod · 0.45

Tested by

no test coverage detected