ARM Compiler toolchain Using the Linker - ARM Information Center
ARM Compiler toolchain Using the Linker - ARM Information Center
ARM Compiler toolchain Using the Linker - ARM Information Center
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
6.3 Example of using <strong>the</strong> --info linker option<br />
To display <strong>the</strong> component sizes when linking enter:<br />
armlink --info sizes ...<br />
Getting information about images<br />
Here, sizes gives a list of <strong>the</strong> Code and Data sizes for each input object and library member in<br />
<strong>the</strong> image. <strong>Using</strong> this option implies --info sizes,totals.<br />
The following example shows <strong>the</strong> output in tabular format with <strong>the</strong> totals separated out for easy<br />
reading:<br />
Code (inc. data) RO Data RW Data ZI Data Debug<br />
Example 6-1 Image component size information<br />
3712 1580 19 44 10200 7436 Object Totals<br />
0 0 16 0 0 0 (incl. Generated)<br />
0 0 3 0 0 0 (incl. Padding)<br />
21376 648 805 4 300 10216 Library Totals<br />
0 0 6 0 0 0 (incl. Padding)<br />
===============================================================================<br />
Code (inc. data) RO Data RW Data ZI Data Debug<br />
25088 2228 824 48 10500 17652 Grand Totals<br />
25088 2228 824 48 10500 17652 ELF Image Totals<br />
25088 2228 824 48 0 0 ROM Totals<br />
===============================================================================<br />
Total RO Size (Code + RO Data) 25912 ( 25.30kB)<br />
Total RW Size (RW Data + ZI Data) 10548 ( 10.30kB)<br />
Total ROM Size (Code + RO Data + RW Data) 25960 ( 25.35kB)<br />
In this example:<br />
Code (inc. Data)<br />
Shows how many bytes are occupied by code. In this image, <strong>the</strong>re are 3712 bytes<br />
of code. This includes 1580 bytes of inline data (inc. data), for example, literal<br />
pools, and short strings.<br />
RO Data Shows how many bytes are occupied by read-only data. This is in addition to <strong>the</strong><br />
inline data included in <strong>the</strong> Code (inc. data) column.<br />
RW Data Shows how many bytes are occupied by read-write data.<br />
ZI Data Shows how many bytes are occupied by zero-initialized data.<br />
Debug Shows how many bytes are occupied by debug data, for example, debug input<br />
sections and <strong>the</strong> symbol and string table.<br />
Object Totals<br />
Shows how many bytes are occupied by objects linked toge<strong>the</strong>r to generate <strong>the</strong><br />
image.<br />
<strong>ARM</strong> DUI 0474C Copyright © 2010-2011 <strong>ARM</strong>. All rights reserved. 6-4<br />
ID080411 Non-Confidential