Latest available version: IDA and decompilers v8.2.230124sp1 see all releases
Hex-Rays logo State-of-the-art binary code analysis tools
email icon
Segment translations

Used to represent overlayed memory banks.

Used to represent overlayed memory banks.

Segment translations are used to redirect access to overlayed segments so that the correct overlay is accessed. Each segment has its own translation list. For example, suppose we have four segments:

    A               1000-2000
    B               1000-2000
      C             2000-3000
      D             2000-3000
  

A and B occupy the same virtual addresses. The same with C and D. Segment A works with segment C, segment B works with segment D.

So all references from A to 2000-3000 should go to C. For this we add translation C for segment A. The same with B,D: add translation D for segment B. Also, we need to specify the correct segment to be accessed from C, thus we add translation A for segment C. And we add translation B for segment D.

After this, all references to virtual addresses 2000-3000 made from A go to segment C (even if segment A would be large and occupy 1000-3000) So, we need the following translations:

    A:      C
    B:      D
    C:      A
    D:      B
 

With translations, the segments may reside at any linear addresses, all references will pass through the translation mechanism and go to the correct segment.

Segment translation works only for code segments (see map_code_ea())