relative_jump_tables

take_address(Src:address, Address_taken:address)

This module deals exclusively with detecting jump tables with relative addresses.

relative_address(EA:address, Size:unsigned, TableStart:address, Reference:address, Dest:address, DestIsFirstOrSecond:symbol)

relative_address_start(EA:address, Size:unsigned, Reference:address, Dest:address, DestIsFirstOrSecond:symbol)

jump_table_element_access(EA:address, Size:unsigned, TableStart:address, RegIndex:register)

jump_table_signed(TableStart:address, Signed:unsigned)

Find sign extensions of the jump table element.

jump_table_max(TableStart:address, TableEnd:address)

The end of a jump table as identified by a boundary value of the index register.

jump_table_start(EA_jump:address, Size:unsigned, TableStart:address, TableRef:address, Scale:number)

A jump table begins at TableStart.

relative_jump_table_entry_target(EA:address, TableStart:address, Size:unsigned, Reference:address, Dest:address, Scale:number)

Calculate the target for a relative jump table entry.

WARNING: Predicate not present in compiled Datalog program (Dead Code)

relative_jump_table_entry_candidate(EA:address, TableStart:address, Size:unsigned, Reference:address, Dest:address, Scale:number, Offset:number)

An entry in a relative jump table of the form (Dest-Reference)/Scale

These are generated during value analysis, and referenced by value analysis, so cannot negate any results of value analysis.

Some of these are discarded to form relative_jump_table_entry, which is used by symbolization.

discarded_jump_table_entry(TableStart:address, TableRef:address, EA:address)

relative_jump_table_entry(EA:address, TableStart:address, Size:unsigned, Reference:address, Dest:address, Scale:number, Offset:number)

An entry in a relative jump table of the form (Dest-Reference)/Scale.

These are generated after data access analysis, and used for symbolization and final CFG generation. This allows using the final results of value analysis to resolve overlapping jump tables.