static orl_return CheckSymbol( orl_symbol_handle orl_sym_hnd ) /************************************************************/ { orl_symbol_binding binding; char *name; orl_symbol_type type; unsigned char info; name = ORLSymbolGetName( orl_sym_hnd ); binding = ORLSymbolGetBinding( orl_sym_hnd ); if( binding == ORL_SYM_BINDING_GLOBAL || binding == ORL_SYM_BINDING_WEAK ) { type = ORLSymbolGetType( orl_sym_hnd ); info = ORLSymbolGetRawInfo( orl_sym_hnd ); if( !( type & ORL_SYM_TYPE_UNDEFINED ) ) { if( type & ORL_SYM_CDAT_MASK || binding == ORL_SYM_BINDING_WEAK ) { AddSym( name, SYM_WEAK, info ); } else { AddSym( name, SYM_STRONG, info ); } } else if( ORLSymbolGetValue( orl_sym_hnd ) != 0 ) { AddSym( name, SYM_WEAK, info ); } } else if( binding == ORL_SYM_BINDING_ALIAS ) { AddSym( name, SYM_WEAK, 0 ); } return( ORL_OKAY ); }
static orl_return CheckSymbol( orl_symbol_handle orl_sym_hnd ) /************************************************************/ { orl_symbol_binding binding; const char *name; orl_symbol_type type; unsigned char info; name = ORLSymbolGetName( orl_sym_hnd ); binding = ORLSymbolGetBinding( orl_sym_hnd ); if( binding == ORL_SYM_BINDING_GLOBAL || binding == ORL_SYM_BINDING_WEAK ) { type = ORLSymbolGetType( orl_sym_hnd ); info = ORLSymbolGetRawInfo( orl_sym_hnd ); if( (type & ORL_SYM_TYPE_UNDEFINED) == 0 ) { if( (type & ORL_SYM_CDAT_MASK) || binding == ORL_SYM_BINDING_WEAK ) { AddSym( name, SYM_WEAK, info ); } else { AddSym( name, SYM_STRONG, info ); } } else { unsigned_64 val64; ORLSymbolGetValue( orl_sym_hnd, &val64 ); if( val64.u._32[I64LO32] != 0 || val64.u._32[I64HI32] != 0 ) { AddSym( name, SYM_WEAK, info ); } } } else if( binding == ORL_SYM_BINDING_ALIAS ) { AddSym( name, SYM_WEAK, 0 ); } return( ORL_OKAY ); }