Ejemplo n.º 1
0
void ORLSkipObj( file_list *list, unsigned long *loc )
/****************************************************/
// skip the object file.
// NYI: add an entry point in ORL for a more efficient way of doing this.
{
    orl_file_handle     filehdl;

    ORLFileSeek( list, *loc, SEEK_SET );
    filehdl = InitFile();               // assumes that entire file is read!
    *loc = ORLFileSeek( list, 0, SEEK_CUR );
    FiniFile( filehdl, list );
}
Ejemplo n.º 2
0
bool IsORL( file_list *list, unsigned long loc )
/**********************************************/
// return true if this is can be handled by ORL
{
    orl_file_format     type;
    bool                isOK;

    isOK = true;
    ORLFileSeek( list, loc, SEEK_SET );
    type = ORLFileIdentify( ORLHandle, list );
    if( type == ORL_ELF ) {
        ObjFormat |= FMT_ELF;
    } else if( type == ORL_COFF ) {
        ObjFormat |= FMT_COFF;
    } else {
        isOK = false;
    }
    ClearCachedData( list );
    return( isOK );
}
Ejemplo n.º 3
0
bool IsORL( file_list *list, wio_off_t loc )
/*************************************************/
// return TRUE if this is can be handled by ORL
{
    orl_file_format     type;
    bool                isOK;

    isOK = TRUE;
    ORLFileSeek( list, loc, SEEK_SET );
    type = ORLFileIdentify( ORLHandle, list );
    if( type == ORL_ELF ) {
        ObjFormat |= FMT_ELF;
    } else if( type == ORL_COFF ) {
        ObjFormat |= FMT_COFF;
    } else {
        isOK = FALSE;
    }
    ClearCachedData( list );
    return( isOK );
}