ARM MAP文件解析-Code (inc. data)RO DataRW DataZI DataDebug

Posted yulinhanhonor

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ARM MAP文件解析-Code (inc. data)RO DataRW DataZI DataDebug相关的知识,希望对你有一定的参考价值。

From:http://www.keil.com/support/man/docs/armlink/armlink_pge1362065942464.htm

5.3 Example of using the --info linker option

This is an example of the output generated by the --info option

To display the component sizes when linking enter:
armlink --info sizes …

Here, sizes gives a list of the Code and data sizes for each input object and library member in the image. Using this option implies --info sizes,totals.

The following example shows the output in tabular format with the totals separated out for easy reading:
Code (inc. data)   RO Data   RW Data    ZI Data      Debug
3712        1580        19        44      10200       7436   Object Totals
0              0        16         0          0          0   (incl. Generated)
0              0         3         0          0          0   (incl. Padding)
21376        648       805         4        300      10216   Library Totals 
0              0         6         0          0          0   (incl. Padding)
===============================================================================
Code (inc. data)   RO Data    RW Data    ZI Data      Debug
25088       2228       824         48      10500      17652   Grand Totals
25088       2228       824         48      10500      17652   ELF Image Totals
25088       2228       824         48          0          0   ROM Totals
===============================================================================
Total RO  Size (Code + RO Data)             25912 (  25.30kB)
Total RW  Size (RW Data + ZI Data)          10548 (  10.30kB)
Total ROM Size (Code + RO Data + RW Data)   25960 (  25.35kB)

In this example:

Code (inc. data)
Shows how many bytes are occupied by code. In this image, there are 3712 bytes of code. This includes 1580 bytes of inline data (inc. data), for example, literal pools, and short strings.
RO Data
Shows how many bytes are occupied by RO data. This is in addition to the inline data included in the Code (inc. data) column.
RW Data
Shows how many bytes are occupied by RW data.
ZI Data
Shows how many bytes are occupied by ZI data.
Debug
Shows how many bytes are occupied by debug data, for example, debug input sections and the symbol and string table.
Object Totals
Shows how many bytes are occupied by objects linked together to generate the image.
(incl. Generated)
armlink might generate image contents, for example, interworking veneers, and input sections such as region tables. If the Object Totals row includes this type of data, it is shown in this row.
In the example, there are 19 bytes of RO data in total, of which 16 bytes is linker-generated RO data.
Library Totals
Shows how many bytes are occupied by library members that have been extracted and added to the image as individual objects.
(incl. Padding)
armlink inserts padding, if required, to force section alignment. If the Object Totals row includes this type of data, it is shown in the associated (incl. Padding) row. Similarly, if the Library Totals row includes this type of data, it is shown in its associated row.
In the example, there are 19 bytes of RO data in the object total, of which 3 bytes is linker-generated padding, and 805 bytes of RO data in the library total, with 6 bytes of padding.
Grand Totals
Shows the true size of the image. In the example, there are 10200 bytes of ZI data (in Object Totals) and 300 of ZI data (in Library Totals) giving a total of 10500 bytes.
ELF Image Totals
If you are using RW data compression (the default) to optimize ROM size, the size of the final image changes and this is reflected in the output from --info. Compare the number of bytes under Grand Totals and ELF Image Totals to see the effect of compression.
In the example, RW data compression is not enabled. If data is compressed, the RW value changes.
ROM Totals
Shows the minimum size of ROM required to contain the image. This does not include ZI data and debug information which is not stored in the ROM.

 

以上是关于ARM MAP文件解析-Code (inc. data)RO DataRW DataZI DataDebug的主要内容,如果未能解决你的问题,请参考以下文章

14.局部段描述符表的使用

iOS:生成的 CoreData 代码中的 EXC_ARM_DA_ALIGN

如何解析 arm64 elf 文件?

Android 逆向arm 汇编 ( 使用 IDA 解析 arm 架构的动态库文件 | 分析 malloc 函数的 arm 汇编语言 )

Android 逆向arm 汇编 ( 使用 IDA 解析 arm 架构的动态库文件 | 分析 malloc 函数的 arm 汇编语言 )

无法解析 config.inc.php 的 phpMyAdmin 权限