行业解决方案查看所有行业解决方案
IDA 用于解决软件行业的关键问题。
发布时间:2023-04-23 15: 32: 56
Action name:SegmentTranslation
A segment translation is a sequence of other segments to use when resolving the references to instructions from the current segment.Only code references are affected by the segment translation.Data references can be redirected to the desired addresses by modifying the data segment register.
This feature is available only for selected processors(it is not available for IBM PC processors).
We hope it is easier to give an example than to give a formal definition.Suppose we have 3 segments:
start end
A 0000 1000
B 1000 2000
C 3000 4000
The instruction
call 1000
in the segment C obviously refers to the segment B while the instruction
call 500
refers to the segment A.
However,IDA does not try to link these references unless you tell it to do so:include the segments A and B into a translation list of the segment C.It means that you have to create a translation list
A B
for the segment C.
Below is a more complicated example:
start end
A 0000 1000
B 1000 2000
C 1000 2000
D 3000 4000
E 3000 4000
translations
B:A
C:A
D:A B
E:A C
allow you to emulate overlays(the first set is A B D,the second A C E)
IMPORTANT NOTE1:If you use the segment translations,make sure that all segments have unique segment bases.If two segments are placed in the linear address space so that they must have the same segment base,you may assign different selectors with equal values to them.
IMPORTANT NOTE2:IDA supports only one translation list per segment.This translation is applied by default to all instruction in the segment.If the segment uses other mappings,then these individual mappings can be specified for each instruction separately by using the make offset commands.
IMPORTANT NOTE3:Since only code references are affected by the segment translations,try to create the RAM segment at its usual place(i.e.its linear address in IDA corresponds to its address in the processor memory).This will make all data references to it to be correct without any segment translation.For the data references to other segments you'll need to use the make offset command for each such reference.
以下为中文翻译:
name:SegmentTranslation
段翻译是在解析对当前段中指令的引用时使用的一系列其他段。只有代码引用受段翻译的影响。通过修改数据段寄存器,可以将数据引用重定向到所需的地址。
此功能仅适用于选定的处理器(不适用于IBM PC处理器)。
我们希望举个例子比给出正式定义更容易。
假设我们有3个段:起始端
A 0000 1000
B 1000 2000
C 30004000
段C中的
指令调用1000显然是指段B,而指令调用500是指段A,IDA不会试图链接这些引用,除非你告诉它这样做:将段A和B包含到段C的翻译列表中。这意味着你必须为段C创建一个翻译列表A B。
下面是一个更复杂的例子:起始端A 0000 1000 B 1000 2000 C 1000 2000 D 3000 4000E 3000 4000
翻译
B:A
C:A
D:A B
E:A
Callow you to simulate overlay(第一组是A B D,第二组是A C E)
重要提示1:如果使用分段翻译,请确保所有
分段都有唯一的分段基础。如果两个段被放置在线性地址空间中,因此它们必须具有相同的段基,则可以为它们分配具有相等值的不同选择器。
重要注意2:IDA每个段仅支持一个转换列表。默认情况下,此转换应用于段中的所有指令。如果段使用其他映射,那么这些单独的映射可以通过使用make offset命令分别为每条指令指定。
重要提示3:由于只有代码引用受到段转换的影响,尝试在其通常的位置创建RAM段(即IDA中的线性地址与处理器内存中的地址相对应)。这将使对它的所有数据引用都是正确的,而无需任何段转换。
对于对其他段的数据引用,您需要对每个这样的引用使用make offset命令。
展开阅读全文
︾