symbols
This module select the symbols to be used in symbolic expressions and declares the predicates needed to infer new symbols.
- inferred_symbol(EA:address, SymbolName:symbol, Scope:symbol, Visibility:symbol, Type:symbol, Pos:symbol_position)
A new symbol ‘SymbolName’ at address ‘EA’ should be created.
Uses:
binary_format,tls_segmentUsed by:
pointer_to_external_symbol,symbol_at_endRecursive:
symbolic_expr,best_symexpr_symbol,symbol_minus_symbol_from_relocation,inferred_symbol_mips,labeled_ea,moved_label_candidate,jump_table,code_in_refined_block,symbol_score,moved_label,+disconnected4,best_func_symbol,symbolic_data,data_limit,string_candidate_refined,+disconnected6,label_conflict,data_object_point,resolved_transfer,split_block,value_reg_address_before,string_candidate,discarded_jump_table_entry,symbol_minus_symbol_candidate,discarded_data_object,code_in_split_block,symbolic_operand_point,block_needs_splitting_at,next_data_limit,got_reference,preferred_data_access,address_array_aux,moved_pc_relative_candidate,data_object_conflict,symbolic_operand_attribute,symbolic_expr_attribute,moved_data_label,block_needs_merging,main_function,labeled_data_candidate,+disconnected1,inferred_special_symbol,relative_jump_table_entry,data_access_limit,data_object_candidate,symbolic_expr_symbol_minus_symbol,next_address_in_data,code_pointer_in_data,inferred_main_function,+disconnected2,refined_block,boundary_sym_expr,function_inference.function_entry,inferred_symbol,symbolic_operand,data_object,subsequent_string_candidate,symbol_minus_symbol,data_object_total_points,data_limit_after_access,address_array,after_address_in_data,moved_displacement_candidate
- inferred_special_symbol(EA:address, SymbolName:symbol, Scope:symbol, Visibility:symbol, Type:symbol, Pos:symbol_position)
A special symbol ‘SymbolName’ at address ‘EA’ has been inferred. Special inferred symbols have higher priority than regular inferred symbols.
Uses:
address_in_data,base_address,binary_format,binary_type,bss_section,entry_point,function_symbol,got_reference_pointer,instruction,loaded_section,op_immediate,pc_relative_operand,relocation,start_function,symbolUsed by:
abi_intrinsicRecursive:
symbolic_expr,best_symexpr_symbol,symbol_minus_symbol_from_relocation,inferred_symbol_mips,labeled_ea,moved_label_candidate,jump_table,code_in_refined_block,symbol_score,moved_label,+disconnected4,best_func_symbol,symbolic_data,data_limit,string_candidate_refined,+disconnected6,label_conflict,data_object_point,resolved_transfer,split_block,value_reg_address_before,string_candidate,discarded_jump_table_entry,symbol_minus_symbol_candidate,discarded_data_object,code_in_split_block,symbolic_operand_point,block_needs_splitting_at,next_data_limit,got_reference,preferred_data_access,address_array_aux,moved_pc_relative_candidate,data_object_conflict,symbolic_operand_attribute,symbolic_expr_attribute,moved_data_label,block_needs_merging,main_function,labeled_data_candidate,+disconnected1,inferred_special_symbol,relative_jump_table_entry,data_access_limit,data_object_candidate,symbolic_expr_symbol_minus_symbol,next_address_in_data,code_pointer_in_data,inferred_main_function,+disconnected2,refined_block,boundary_sym_expr,function_inference.function_entry,inferred_symbol,symbolic_operand,data_object,subsequent_string_candidate,symbol_minus_symbol,data_object_total_points,data_limit_after_access,address_array,after_address_in_data,moved_displacement_candidate
- best_symexpr_symbol(EA:address, SymbolName:symbol, Pos:symbol_position)
Best symbol at address ‘EA’ to be used for symbolic expressions. There can be two variants: If ‘Pos’ is “Beg”, the symbol points to the beginning of a block. If ‘Pos’ is “End”, the symbol points at the end of a block.
Uses:
symbolUsed by:
cfi_directiveRecursive:
symbolic_expr,best_symexpr_symbol,symbol_minus_symbol_from_relocation,inferred_symbol_mips,labeled_ea,moved_label_candidate,jump_table,code_in_refined_block,symbol_score,moved_label,+disconnected4,best_func_symbol,symbolic_data,data_limit,string_candidate_refined,+disconnected6,label_conflict,data_object_point,resolved_transfer,split_block,value_reg_address_before,string_candidate,discarded_jump_table_entry,symbol_minus_symbol_candidate,discarded_data_object,code_in_split_block,symbolic_operand_point,block_needs_splitting_at,next_data_limit,got_reference,preferred_data_access,address_array_aux,moved_pc_relative_candidate,data_object_conflict,symbolic_operand_attribute,symbolic_expr_attribute,moved_data_label,block_needs_merging,main_function,labeled_data_candidate,+disconnected1,inferred_special_symbol,relative_jump_table_entry,data_access_limit,data_object_candidate,symbolic_expr_symbol_minus_symbol,next_address_in_data,code_pointer_in_data,inferred_main_function,+disconnected2,refined_block,boundary_sym_expr,function_inference.function_entry,inferred_symbol,symbolic_operand,data_object,subsequent_string_candidate,symbol_minus_symbol,data_object_total_points,data_limit_after_access,address_array,after_address_in_data,moved_displacement_candidate
- best_func_symbol(EA:address, SymbolName:symbol)
Best function symbol at address ‘EA’.
Uses:
binary_formatRecursive:
symbolic_expr,best_symexpr_symbol,symbol_minus_symbol_from_relocation,inferred_symbol_mips,labeled_ea,moved_label_candidate,jump_table,code_in_refined_block,symbol_score,moved_label,+disconnected4,best_func_symbol,symbolic_data,data_limit,string_candidate_refined,+disconnected6,label_conflict,data_object_point,resolved_transfer,split_block,value_reg_address_before,string_candidate,discarded_jump_table_entry,symbol_minus_symbol_candidate,discarded_data_object,code_in_split_block,symbolic_operand_point,block_needs_splitting_at,next_data_limit,got_reference,preferred_data_access,address_array_aux,moved_pc_relative_candidate,data_object_conflict,symbolic_operand_attribute,symbolic_expr_attribute,moved_data_label,block_needs_merging,main_function,labeled_data_candidate,+disconnected1,inferred_special_symbol,relative_jump_table_entry,data_access_limit,data_object_candidate,symbolic_expr_symbol_minus_symbol,next_address_in_data,code_pointer_in_data,inferred_main_function,+disconnected2,refined_block,boundary_sym_expr,function_inference.function_entry,inferred_symbol,symbolic_operand,data_object,subsequent_string_candidate,symbol_minus_symbol,data_object_total_points,data_limit_after_access,address_array,after_address_in_data,moved_displacement_candidate
- symbol_score(EA:address, SymbolName:symbol, Type:symbol, Pos:symbol_position, Score:unsigned)
This predicate is computed to decide which is the best symbol for symbolic expressions or the best function symbol at each address. Each symbol receives a score based on its properties.
Uses:
ambiguous_symbol,avoid_symbols,defined_symbol,relocation,symbol_at_section_end,symbol_scope_score,symbol_type_score,symbol_visibility_scoreRecursive:
symbolic_expr,best_symexpr_symbol,symbol_minus_symbol_from_relocation,inferred_symbol_mips,labeled_ea,moved_label_candidate,jump_table,code_in_refined_block,symbol_score,moved_label,+disconnected4,best_func_symbol,symbolic_data,data_limit,string_candidate_refined,+disconnected6,label_conflict,data_object_point,resolved_transfer,split_block,value_reg_address_before,string_candidate,discarded_jump_table_entry,symbol_minus_symbol_candidate,discarded_data_object,code_in_split_block,symbolic_operand_point,block_needs_splitting_at,next_data_limit,got_reference,preferred_data_access,address_array_aux,moved_pc_relative_candidate,data_object_conflict,symbolic_operand_attribute,symbolic_expr_attribute,moved_data_label,block_needs_merging,main_function,labeled_data_candidate,+disconnected1,inferred_special_symbol,relative_jump_table_entry,data_access_limit,data_object_candidate,symbolic_expr_symbol_minus_symbol,next_address_in_data,code_pointer_in_data,inferred_main_function,+disconnected2,refined_block,boundary_sym_expr,function_inference.function_entry,inferred_symbol,symbolic_operand,data_object,subsequent_string_candidate,symbol_minus_symbol,data_object_total_points,data_limit_after_access,address_array,after_address_in_data,moved_displacement_candidate
- symbol_type_score(Type:symbol, Scope:unsigned)
Auxiliary predicate to define
symbol_score. Prefer symbols with type different than NOTYPE.Uses:
symbolUsed by:
symbol_score
- symbol_scope_score(Scope:symbol, Score:unsigned)
Auxiliary predicate to define
symbol_scoreUses:
symbolUsed by:
symbol_score
- symbol_visibility_score(Visibility:symbol, Score:unsigned)
Auxiliary predicate to define
symbol_score. Prefer symbols that are not HIDDEN.Uses:
symbolUsed by:
ifunc_symbol_score,symbol_score
- avoid_symbols(SymbolName:symbol)
This predicate records a set of symbols that should not be used in symbolic expressions. These symbols are skipped by the pprinter. TODO: maybe the pprinter could stop skipping these symbols and we could remove them from here.
Uses:
arm_sym,binary_format,data_sym,elf_avoid_symbols,thumb_symUsed by:
symbol_score
- elf_avoid_symbols(SymbolName:symbol)
This predicate records the set of symbols that should not be used in symbolic expressions for ELF binaries
Used by:
avoid_symbols
- symbol_at_section_end(EA:address, SymbolName:symbol)
An existing symbol is pointing to the end of a section rather than the beginning of the next section.
Used by:
symbol_score
- symbol_at_end(EA:address, SymbolName:symbol)
The symbol at address ‘EA’ with name ‘SymbolName’ should point at the end of a block.
Uses:
inferred_symbol,section,symbol
- symbol_before_section_beg(EA:address, SymbolName:symbol, NewEA:address)
The symbol at address ‘EA’ with name ‘SymbolName’ is pointing outside its own section and should be moved to ‘NewEA’.