19#include <Library/DebugLib.h>
102 for (Index = 0; Index < NumRelocs; ++Index) {
103 Relocation = &Relocs[Index];
107 if ( (Relocation->
Extern == 0)
113 if ((UINT64)Relocation->
Address == Address) {
123 if (Index == (MAX_UINT32 - 1)) {
148 UINT32 RelocationCount;
153 if (Section == NULL) {
161 if (RelocationCount > 0) {
165 for (Index = 0; Index < RelocationCount; Index++) {
166 Relocation = &Relocations[Index];
170 if ( (Relocation->
Extern == 0)
179 if (Relocation->
Extern != (UINT32)(External ? 1 : 0)) {
183 if (Context->Is32Bit) {
219 if (Context->DySymtab == NULL) {
229 Context->DySymtab->NumExternalRelocations,
230 Context->ExternRelocations
252 if (Context->DySymtab == NULL) {
262 Context->DySymtab->NumOfLocalRelocations,
263 Context->LocalRelocations
#define MACH_RELOC_ABSOLUTE
absolute relocation type for Mach-O files
@ MachGenericRelocSectDiff
@ MachGenericRelocLocalSectDiff
@ MachX8664RelocUnsigned
for absolute addresses
@ MachX8664RelocSubtractor
MACH_SECTION_ANY * MachoGetSectionByIndex(IN OUT OC_MACHO_CONTEXT *Context, IN UINT32 Index)
MACH_RELOCATION_INFO * InternalGetExternRelocationByOffset(IN OUT OC_MACHO_CONTEXT *Context, IN UINT64 Address)
STATIC MACH_RELOCATION_INFO * InternalLookupSectionRelocationByOffset(IN OUT OC_MACHO_CONTEXT *Context, IN UINT64 Address, IN BOOLEAN External)
STATIC MACH_RELOCATION_INFO * InternalLookupRelocationByOffset(IN UINT64 Address, IN UINT32 NumRelocs, IN MACH_RELOCATION_INFO *Relocs)
BOOLEAN MachoRelocationIsPairIntel64(IN UINT8 Type)
BOOLEAN MachoPreserveRelocationIntel64(IN UINT8 Type)
BOOLEAN MachoRelocationIsPairIntel32(IN UINT8 Type)
BOOLEAN MachoIsRelocationPairTypeIntel64(IN UINT8 Type)
MACH_RELOCATION_INFO * InternalGetLocalRelocationByOffset(IN OUT OC_MACHO_CONTEXT *Context, IN UINT64 Address)
UINT32 Extern
does not include value of sym referenced
UINT32 Type
if not 0, machine specific relocation type
UINT32 RelocationsOffset
file offset of relocation entries
UINT64 Address
memory address of this section
UINT32 NumRelocations
number of relocation entries
UINT32 Address
memory address of this section
UINT32 NumRelocations
number of relocation entries
UINT32 RelocationsOffset
file offset of relocation entries
MACH_SECTION_64 Section64