object.c
/*
 *  addExtRelocationEntry - add an extended relocation table entry to a referenced object block
 */
add an extended relocation table entry to a referenced object block
add an extended relocation table entry to a referenced object block
static void addExtRelocationEntry(Section *section, Value *val, bool isParcelRelocation, u32 bitAddress, u8 fieldLength) {
    ObjectBlock *baseBlock;
    RelocationTableEntry *entry;
    u16 targetBlockIndex;
    if (pass == 1) return;
    baseBlock = section->objectBlock;
    if (baseBlock->relocationTableIndex >= baseBlock->relocationTableSize) {
        baseBlock->relocationTable = (RelocationTableEntry *)reallocate(baseBlock->relocationTable,
            baseBlock->relocationTableSize * sizeof(RelocationTableEntry),
            (baseBlock->relocationTableSize + RELOC_TABLE_INCREMENT) * sizeof(RelocationTableEntry));
        baseBlock->relocationTableSize += RELOC_TABLE_INCREMENT;
    }
    entry = &baseBlock->relocationTable[baseBlock->relocationTableIndex++];
    entry->type = RelocEntryType_Extended;
    entry->blockIndex = val->section->objectBlock->index;
    entry->offset = bitAddress;
    entry->fieldLength = fieldLength & 0x3f;
    entry->isParcelRelocation = isParcelRelocation;
}
static void addExtRelocationEntry ( Section * section , Value * val , bool isParcelRelocation , u32 bitAddress , u8 fieldLength ) { ObjectBlock * baseBlock ; RelocationTableEntry * entry ; u16 targetBlockIndex ; if ( pass == 1 ) return ; baseBlock = section -> objectBlock ; if ( baseBlock -> relocationTableIndex >= baseBlock -> relocationTableSize ) { baseBlock -> relocationTable = ( RelocationTableEntry * ) reallocate ( baseBlock -> relocationTable , baseBlock -> relocationTableSize * sizeof ( RelocationTableEntry ) , ( baseBlock -> relocationTableSize + RELOC_TABLE_INCREMENT ) * sizeof ( RelocationTableEntry ) ) ; baseBlock -> relocationTableSize += RELOC_TABLE_INCREMENT ; } entry = & baseBlock -> relocationTable [ baseBlock -> relocationTableIndex ++ ] ; entry -> type = RelocEntryType_Extended ; entry -> blockIndex = val -> section -> objectBlock -> index ; entry -> offset = bitAddress ; entry -> fieldLength = fieldLength & 0x3f ; entry -> isParcelRelocation = isParcelRelocation ; }
addExtRelocationEntry - add an extended relocation table entry to a referenced object block
addExtRelocationEntry - add an extended relocation table entry to a referenced object block