object.c
/*
 *  addExternalEntry - add a relocation table entry to a referenced object block
 */
add a relocation table entry to a referenced object block
add a relocation table entry to a referenced object block
static void addExternalEntry(Section *section, Value *val, bool isParcelRelocation, u32 bitAddress, u8 fieldLength) {
    ObjectBlock *block;
    ExternalTableEntry *entry;
    u16 targetBlockIndex;
    if (pass == 1) return;
    block = section->objectBlock;
    if (block->externalTableIndex >= block->externalTableSize) {
        block->externalTable = (ExternalTableEntry *)reallocate(block->externalTable,
            block->externalTableSize * sizeof(ExternalTableEntry),
            (block->externalTableSize + EXTERN_TABLE_INCREMENT) * sizeof(ExternalTableEntry));
        block->externalTableSize += EXTERN_TABLE_INCREMENT;
    }
    entry = &block->externalTable[block->externalTableIndex++];
    entry->externalIndex = val->externalSymbol->externalIndex;
    entry->bitAddress = bitAddress;
    entry->fieldLength = fieldLength;
    entry->isParcelRelocation = isParcelRelocation;
}
static void addExternalEntry ( Section * section , Value * val , bool isParcelRelocation , u32 bitAddress , u8 fieldLength ) { ObjectBlock * block ; ExternalTableEntry * entry ; u16 targetBlockIndex ; if ( pass == 1 ) return ; block = section -> objectBlock ; if ( block -> externalTableIndex >= block -> externalTableSize ) { block -> externalTable = ( ExternalTableEntry * ) reallocate ( block -> externalTable , block -> externalTableSize * sizeof ( ExternalTableEntry ) , ( block -> externalTableSize + EXTERN_TABLE_INCREMENT ) * sizeof ( ExternalTableEntry ) ) ; block -> externalTableSize += EXTERN_TABLE_INCREMENT ; } entry = & block -> externalTable [ block -> externalTableIndex ++ ] ; entry -> externalIndex = val -> externalSymbol -> externalIndex ; entry -> bitAddress = bitAddress ; entry -> fieldLength = fieldLength ; entry -> isParcelRelocation = isParcelRelocation ; }
addExternalEntry - add a relocation table entry to a referenced object block
addExternalEntry - add a relocation table entry to a referenced object block