1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
3  <head>
4    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5    <meta http-equiv="Content-Style-Type" content="text/css" />
6    <title>Build System Development Guide (for High-Level DLLs)</title>
7    <style>
8        h1.left
9        {
10            color: #46f;
11            font-size: 120%;
12        }
13        ul.left, ul.left ul
14        {
15            margin: 0;
16            padding: 0;
17        }
18        ul.left
19        {
20            font-size: 0.8em;
21        }
22        ul.left li
23        {
24            margin: 0;
25            padding: 0;
26            margin-left: 1em;
27            line-height: 1.5em;
28        }
29        ul.left li a
30        {
31            margin: 0;
32            padding: 0;
33        }
34
35        H1
36        {
37            font-weight         : bold;
38            font-size           : 250%;
39            text-align          : left;
40            color               : #46f;
41            margin-bottom       : 0px;
42        }
43
44        H2
45        {
46            font-weight         : normal;
47            font-size           : 180%;
48            margin              : 24pt 0pt 6pt 0pt;
49            border-bottom-style : solid;
50            border-bottom-width : 1px;
51        }
52
53        H3
54        {
55            font-weight         : bold;
56            font-size           : 120%;
57            border-bottom-style : solid;
58            border-bottom-width : 1px;
59            width: 75%;
60            margin              : 18pt 0pt 6pt 30pt;
61        }
62
63        H4
64        {
65            font-weight         : bold;
66            font-size           : 100%;
67            margin              : 12pt 0pt 6pt 30pt;
68        }
69
70        H5
71        {
72            font-weight         : bold;
73            margin              : 12pt 0pt 6pt 30pt;
74        }
75
76        H6
77        {
78            font-weight         : bold;
79            margin              : 12pt 0pt 6pt 30pt;
80        }
81
82        DIV.date
83        {
84            text-align          : right;
85            color               : #46f;
86            margin-bottom       : 30pt;
87            line-height         : 150%;
88        }
89
90        P
91        {
92            margin              : 6pt 0pt 6pt 30pt;
93            line-height         : 150%;
94        }
95
96        OL,UL
97        {
98            margin              : 6pt 0pt;
99            padding-left: 5em;
100        }
101        DL
102        {
103            margin              : 6pt 0pt 6pt 4em;
104        }
105        OL OL, UL UL
106        {
107            margin: 0.5em 0;
108            padding-left: 2em;
109        }
110        table ul
111        {
112          margin: 0.2em 0;
113          padding-left: 1em;
114        }
115
116        DT
117        {
118            font-family         : "Courier New", monospace;
119            margin-top : 0.3em;
120            margin-bottom : 0.3em;
121        }
122        DD
123        {
124            margin-top : 0.3em;
125            margin-bottom : 0.6em;
126        }
127
128        PRE
129        {
130            font-family         : "Courier New", monospace;
131            font-weight         : normal;
132
133            margin              : 0pt 0pt 20pt 50pt;
134            padding             : 2pt 8pt 2pt 8pt;
135            background-color    : #eee;
136
137            border-style        : solid;
138            border-width        : 1px;
139            white-space:     pre-wrap;
140        }
141        em
142        {
143            font-style: normal;
144            color: red;
145        }
146        TABLE
147        {
148            margin-left         : 40pt;
149            margin-bottom       : 20pt;
150            border-color        : #aaa;
151            border-width        : 1pt;
152            border-style        : solid;
153        }
154        th
155        {
156            white-space: nowrap;
157            border-color: #aaa;
158            background-color: #ccc;
159            font-weight: normal;
160        }
161        TD
162        {
163            font-style          : normal;
164            padding             : 2pt 4pt 2pt 4pt;
165
166            border-color        : #aaa;
167            border-width        : 1pt;
168            border-style        : solid;
169        }
170        div.footer
171        {
172            border-color: black;
173            padding-top: 0.5em;
174            border-top-style    : solid;
175            border-top-width    : 1px;
176            width:              100%;
177            margin-top: 2em;;
178        }
179        div.footer span
180        {
181            color               : #46f;
182            float: right;
183        }
184        table
185        {
186            border-collapse:    collapse;
187        }
188        ul
189        {
190            margin-top: 1em;
191            margin-bottom: 1em;
192        }
193        DL.history
194        {
195            margin: 1em;
196        }
197        DL.history DT
198        {
199            font-family         : sans-serif;
200            font-weight         : bold;
201            font-size           : 0.8em;
202            margin              : 0px;
203        }
204        DL.history DD
205        {
206            font-size           : 0.9em;
207            margin              : 0px 0px 4px 0px;
208        }
209        .info
210        {
211            color: green;
212        }
213
214    </style>
215    <script type="text/javascript">
216    //<![CDATA[
217        function DeleteRule(index)
218        {
219            var ss = document.styleSheets.item(0);
220
221            if( ss.removeRule )
222            {
223                ss.removeRule(index);
224            }
225            else
226            {
227                ss.deleteRule(index);
228            }
229        }
230        function OnClickAnchor(e, anchor)
231        {
232            window.parent.frames[1].location.hash = anchor;
233
234            if( e.preventDefault )
235            {
236                e.preventDefault();
237            }
238            else
239            {
240                e.returnValue = false;
241            }
242        }
243        function TravLeft(obj)
244        {
245            var ary = new Array();
246            var index = 0;
247
248            for( var i = 0; i < obj.childNodes.length; ++i )
249            {
250                var c = obj.childNodes.item(i);
251
252                if( c.nodeType == 1 )
253                {
254                    if( c.tagName == "H2" || c.tagName == "H3" )
255                    {
256                        var a = c.childNodes.item(0);
257                        var text  = "";
258
259                        var anchor = "name-" + index;
260                        index++;
261
262                        if( a && a.tagName == "A" )
263                        {
264                            text  = a.innerHTML;
265                        }
266                        else
267                        {
268                            text  = c.innerHTML;
269                        }
270
271                        ary.push([c.tagName.substr(1,1), "<a target=\"right\" href=\"?right#" + anchor + "\" onclick=\"OnClickAnchor(event, '" + anchor + "')\">" + text + "</a>"]);
272                    }
273                    else
274                    {
275                        ary = ary.concat(TravLeft(c));
276                    }
277                }
278            }
279
280            return ary;
281        }
282        function TravRight(obj)
283        {
284            var index = 0;
285
286            for( var i = 0; i < obj.childNodes.length; ++i )
287            {
288                var c = obj.childNodes.item(i);
289
290                if( c.nodeType == 1 )
291                {
292                    if( c.tagName == "H2" || c.tagName == "H3" )
293                    {
294                        var anchor = "name-" + index;
295                        index++;
296
297                        c.innerHTML = "<a name=\"" + anchor + "\">" + c.innerHTML + "</a>"
298                    }
299                    else
300                    {
301                        TravRight(c);
302                    }
303                }
304            }
305        }
306        function OnLoad_Left()
307        {
308            var test = TravLeft(document.body);
309            var test2 = "";
310            var level = 2;
311
312            test2 += "<h1 class='left'>" + document.title + "</h1>";
313            test2 += "<ul class='left'>";
314            for( var i in test )
315            {
316                while( test[i][0] > level )
317                {
318                    level++;
319                    test2 += "<ul>";
320                }
321                while( test[i][0] < level )
322                {
323                    level--;
324                    test2 += "</ul>";
325                }
326
327                test2 += "<li>" + test[i][1];
328            }
329            test2 += "</ul>";
330
331            document.body.innerHTML = test2;
332            DeleteRule(0);
333        }
334        function OnLoad_Right()
335        {
336            TravRight(document.body);
337        }
338        function OnLoad_Frame()
339        {
340            var myname = location.pathname.substr(location.pathname.lastIndexOf("/") + 1);
341
342            var f = document.createElement("frameset");
343            var l = document.createElement("frame");
344            var r = document.createElement("frame");
345
346            f.appendChild(l);
347            f.appendChild(r);
348            f.cols = "250,*";
349
350            l.src  = myname + "?left"  + location.hash;
351            r.src  = myname + "?right" + location.hash;
352            l.name = "left";
353            r.name = "right";
354
355            var h = document.documentElement;
356            var b = h.getElementsByTagName("body").item(0);
357
358            h.replaceChild(f, b);
359        }
360
361
362        if( ! window.opera )
363        {
364            var search = location.search;
365
366            if( search == "?left" )
367            {
368                window.onload = OnLoad_Left;
369            }
370            else if( search == "" )
371            {
372                window.onload = OnLoad_Frame;
373            }
374            else if( search == "?right" )
375            {
376                window.onload = OnLoad_Right;
377            }
378
379            if( search != "?right" )
380            {
381                var ss = document.styleSheets.item(0);
382
383                if( ss.addRule )
384                {
385                    ss.addRule("body", "display: none", 0);
386                }
387                else
388                {
389                    ss.insertRule("body {display: none}", 0);
390                }
391            }
392        }
393      //]]>
394    </script>
395  </head>
396  <body><br />
397    <h1>Build System Development Guide (for High-Level DLLs)</h1>
398    <div class="date">(2012.06.22)</div>
399    <h2>Introduction</h2>
400    <h3>About This Document</h3>
401    <p> This document provides the information necessary for those who are using the <CODE>.ro</CODE> format who want to create their own build system that is more advanced and surpasses the capabilities of the build system provided in the SDK.  </p>
402    <ul>
403      <li><CODE>.xrl</CODE> file specification </li>
404      <li>Features of the <CODE>makecro</CODE> tool<br />
405      </li>
406      <li>Detailed SDK build steps</li>
407      <li>Important issues, SDK support, strategies, and tips<br />
408      </li>
409    </ul>
410    <p> To make <CODE>.ro</CODE> easy to use, the build system provided in the SDK makes some features unavailable and also has a number of limitations. Creating your own build system allows for flexible adjustments without these limitations.<br />
411    </p>
412    <p>Unlike the <a href="BuildSystemDevelopmentGuideForDll.html" target="_parent">Guide to Developing a Build System (for DLLs)</a>, this document is not intended to create a particular build system. Rather, it presents information on the parts that you would combine to create your own build system.</p>
413    <h3>Prerequisites</h3>
414    <p> This document assumes an understanding of the build flow with <CODE>.cro</CODE> that is used by the build system in the SDK. Before you proceed, please review the <a href="DllManual.html" target="_parent">DLL Manual</a> and the <a href="BuildSystemDevelopmentGuideForDll.html" target="_parent">Build System Development Guide (for DLLs)</a>.</p>
415    <p> This document also assumes basic knowledge of <CODE>CTR-SDK</CODE> terminology. For a glossary of basic CTR-SDK terms, see <a          href="../Glossary/Glossary.html">CTR-SDK Terminology</a>. </p>
416    <p> Finally, this document assumes some degree of familiarity with ELF. The CTR-SDK does not describe ELF. For more information about ELF, see one of the commercially available books.</p>
417    <h3>Notation Used in This Document</h3>
418    <p>In this document, the names of Windows tools contained in the <CODE>tools/CommandLineTools</CODE> directory are abbreviated by omitting the leading <CODE>ctr_</CODE> and the ending file extension. For example, the abbreviation for <CODE>ctr_makerom32.exe</CODE> is <CODE>makerom</CODE>. </p>
419    <h3>Components</h3>
420    <p><a href="#h2_glossary">Terminology</a> presents descriptions of the terms used in this document.<br />
421    </p>
422    <p>The sections <a href="#h2_xrl">XRL File Specification</a>, <a href="#h2_buildstep">SDK Build Steps</a> and <a          href="#h2_makecro">Features of the <CODE>makecro</CODE> Tool</a> all describe their topics in detail.<br />
423    </p>
424    <p>The sections <a href="#h2_make_cro">Create CRO File</a>、<a href="#h2_task">Issues and Support</a> and <a          href="#h2_hint">Strategies and Tips</a> present descriptions of the overall build system, including important considerations for creating <CODE>.cro</CODE> with your own build system.</p>
425    <p><a href="#h2_make_crr">Create <CODE>.crr</CODE> File</a> describes how to create the <CODE>.crr</CODE> file.</p>
426    <h2><a name="h2_glossary">Terminology</a><br />
427    </h2>
428    <p> This section describes the terminology used in this document. </p>
429    <p> The meanings and usage of terms used in this document may differ from their general meanings and usage, as well as their meaning in other CTR-SDK documentation. </p>
430    <dl>
431      <dt>ELF file</dt>
432      <dd>The file created as a result of compiling or linking source code by the <CODE>ARMCC</CODE> compiler and linker.</dd>
433      <dt>Executable ELF</dt>
434      <dd>An <code>ET_EXEC</code> type ELF file.</dd>
435      <dt>Relocatable ELF</dt>
436      <dd>An <code>ET_REL</code> type ELF file.</dd>
437      <dt>Shared object ELF</dt>
438      <dd>An <code>ET_DYN</code> type ELF file.</dd>
439      <dt>Object file </dt>
440      <dd>A relocatable ELF file obtained as the result of compiling the source code by the compiler.<br />
441      </dd>
442      <dt>Partial link file </dt>
443      <dd>A relocatable ELF file obtained as the result of partial linking by the linker.<br />
444      </dd>
445      <dt>Command file<br />
446      </dt>
447      <dd>A file that specifies command-line options.<br /> The ARMCC tools can read command-line options from a file, rather than from the command line. This feature is used when a number of command-line options are specified.<br />
448      </dd>
449      <dt>Steering file<br />
450      </dt>
451      <dd>A file that specifies operations on symbols with <CODE>armlink</CODE>.</dd>
452      <dt>Build system of the SDK</dt>
453      <dd>Refers to the procedure and mechanism for creating the <CODE>.cro</CODE> file, as explained in <a href="BuildSystemDevelopmentGuideForDll.html" target="_parent">Build System Development Guide (for DLLs)</a>.<br />
454      </dd>
455      <dt>Build steps</dt>
456      <dd>The necessary step-by-step procedure for creating the <CODE>.cro</CODE> file and related resources.<br />
457      </dd>
458    </dl>
459    <h2><a name="h2_xrl"><CODE>.xrl</CODE> File Specification<br /></a></h2>
460    <p><CODE>.xrl</CODE> is an XML format file used by <CODE>makecro</CODE>.<br />
461    </p>
462    <h3>Role of the <CODE>.xrl</CODE> File</h3>
463    <p>The role of the <CODE>.xrl</CODE> file is to supplement the ELF file by storing information essential for <CODE>.ro</CODE> that is not stored in the ELF file. <CODE>.ro</CODE> requires one <CODE>.xrl</CODE> file for each module. The <CODE>.xrl</CODE> file contains information about the symbols exported by the module, and the symbols that are referenced. <CODE>makero</CODE> builds export and reference information based on the information in the <CODE>.xrl</CODE> file.</p>
464    <p>The <CODE>.xrl</CODE> file also contains information that helps automate referencing and exporting by tools. By using this information, <CODE>makecro</CODE> can realize features that are required to automate referencing and exporting. </p>
465    <h3>Information in the <CODE>.xrl</CODE> File </h3>
466    <p>The following information is held in the <CODE>.xrl</CODE> file.</p>
467    <ul>
468      <li>Module name.<br />
469      </li>
470      <li>List of symbols to reference.</li>
471      <li>List of symbols to export.</li>
472      <li>Export types of symbols to export.<br />
473      </li>
474      <li>Index numbers for symbols to export in <CODE>index</CODE> format.</li>
475      <li>Information for automating referencing and exporting.</li>
476      <ul>
477        <li>Flag that indicates whether the tool performs automatic filtering.</li>
478        <li>Flag that indicates whether to force the references.</li>
479        <li>Flag that indicates whether symbols are functions.</li>
480        <li>Flag that indicates whether an exported symbol is referenced.<br />
481        </li>
482      </ul>
483      <li>Cache for values that can be obtained from other <CODE>.xrl</CODE> files.</li>
484      <ul>
485        <li>Export types of the symbols to reference.</li>
486        <li>Index numbers for the symbols to reference in <CODE>index</CODE> format.</li>
487        <li>Module name that defines the symbols to reference in <CODE>index</CODE> or <CODE>offset</CODE> format.<br />
488        </li>
489      </ul>
490      <li>Cache for values that can be obtained from ELF files.</li>
491      <ul>
492        <li>Offset information for the symbols to export.<br />
493        </li>
494      </ul>
495    </ul>
496    <h3>Elements and Structure of the <CODE>.xrl</CODE> File</h3>
497    <p>The <CODE>.xrl</CODE> file has a simple structure, composed of the following six elements.</p>
498    <ul>
499      <li><code>module</code></li>
500      <li><code>moduleInfo</code></li>
501      <li><code>imports</code></li>
502      <li><code>import</code></li>
503      <li><code>exports</code><br />
504      </li>
505      <li><code>export</code></li>
506    </ul>
507    <p><code>module</code> is the root element, and it contains the <code>moduleInfo</code>, <code>imports</code>, and <code>exports</code> elements.  The <code>imports</code> element contains the <code>import</code> element, and the <code>exports</code>  element contains the <code>export</code> element. This basic structure is fixed. The only differences between <CODE>.xrl</CODE> files are the attribute values, and the content and numbers of the <code>import</code> and <code>export</code> elements.</p>
508    <pre>module<br <//>  ├ moduleInfo<br <//>  ├ imports<br <//>  │   └ import
509  └ exports<br <//>      └ import
510</pre>
511    <h4>The <code>module</code> Element</h4>
512    <p>The <code>module</code> element is the root element of the <CODE>.xrl</CODE> file. As a child element, it has at most one <code>moduleInfo</code> element and one <code>imports</code> element, and any number of <code>exports</code> elements. It does not have an attribute.</p>
513    <pre>&lt;module&gt;<br <//>    &lt;moduleInfo/&gt;<br <//>    &lt;imports&gt;
514        ...
515    &lt;/imports&gt;
516    &lt;exports&gt;
517        ...
518    &lt;/exports&gt;
519&lt;/module&gt;
520</pre>
521    <h4>The <code>moduleInfo</code> Element</h4>
522    <p>The <code>moduleInfo</code> element stores information about the overall module. It does not have any child elements. It has the following attributes.</p>
523    <table border="1">
524      <thead>
525        <tr>
526          <th>Attribute<br />
527          </th>
528          <th>Value<br />
529          </th>
530          <th>Description<br />
531          </th>
532          <th>Omitted values<br />
533          </th>
534        </tr>
535      </thead>
536      <tbody>
537        <tr>
538          <th style="white-space: nowrap;">name<br />
539          </th>
540          <td style="white-space: nowrap;">Module name<br />
541          </td>
542          <td>Specifies the name of the shader symbol. <br /> If it is a static module, it must be named as &quot;<code>|static|</code>.&quot;<br />
543          </td>
544          <td style="white-space: nowrap;">(Cannot be omitted.)<br />
545          </td>
546        </tr>
547      </tbody>
548    </table>
549    <pre>    ...
550    &lt;moduleInfo name="SampleModule" /&gt;
551    ...
552</pre>
553    <h4>The <code>imports</code> Element</h4>
554    <p>The <code>imports</code> element is a collection of <code>import</code> elements. As a child element, it can hold any number of <code>import</code> elements. It does not have an attribute.</p>
555    <pre>    ...
556    &lt;imports&gt;
557        &lt;import&gt; ... &lt;/import&gt;
558        &lt;import&gt; ... &lt;/import&gt;
559        &lt;import&gt; ... &lt;/import&gt;
560    &lt;/imports&gt;
561    ...
562</pre>
563    <h4>The <code>import</code> Element</h4>
564    <p>The <code>import</code> element specifies a symbol for which a reference is generated. As its content, the element specifies the name of the symbol for which a reference is generated. Each <code>import</code> element specifies one symbol. Symbol names must be mangled. It has the following attributes.<br />
565    </p>
566    <table border="1">
567      <thead>
568        <tr>
569          <th>Attribute<br />
570          </th>
571          <th>Value<br />
572          </th>
573          <th>Description<br />
574          </th>
575          <th>Omitted values</th>
576        </tr>
577      </thead>
578      <tbody>
579        <tr>
580          <th><CODE>auto</CODE><br />
581          </th>
582          <td><CODE>TRUE</CODE> or <CODE>FALSE</CODE><br />
583          </td>
584          <td>Specifies whether the entry was generated automatically by the tool. <CODE>TRUE</CODE> indicates that it was generated automatically.<br />
585          </td>
586          <td><code><CODE>FALSE</CODE></code><br />
587          </td>
588        </tr>
589        <tr>
590          <th><CODE>type</CODE><br />
591          </th>
592          <td>Either <code>symbol</code>, <code>index</code>, or <code>offset</code>.<br />
593          </td>
594          <td>Specifies the reference type of the symbol to reference.<br /> <code>symbol</code>, <code>index</code>, and <code>offset</code> correspond respectively to symbol name, index, and offset.</td>
595          <td><code>symbol</code><br />
596          </td>
597        </tr>
598        <tr>
599          <th><CODE>module</CODE><br />
600          </th>
601          <td>Module name<br />
602          </td>
603          <td>Specifies the module that defines the symbol to reference. Use this attribute if the export type of the symbol to reference is either <CODE>index</CODE> or <CODE>offset</CODE>.<br />
604          </td>
605          <td>(None)<br />
606          </td>
607        </tr>
608        <tr>
609          <th><CODE>index</CODE><br />
610          </th>
611          <td>A decimal number.<br />
612          </td>
613          <td>Stores the index number of the symbol to reference. Use this attribute if the export type of the symbol to reference is <CODE>index</CODE>.<br />
614          </td>
615          <td style="white-space: nowrap;">(None)</td>
616        </tr>
617        <tr>
618          <th><CODE>force</CODE><br />
619          </th>
620          <td><CODE>TRUE</CODE> or <CODE>FALSE</CODE><br />
621          </td>
622          <td>Specifies whether to force the reference. <CODE>TRUE</CODE> indicates that the reference is forced.<br />
623          </td>
624          <td><code><CODE>FALSE</CODE></code><br />
625          </td>
626        </tr>
627      </tbody>
628    </table>
629    <pre>    ...
630    &lt;import auto="false" type="symbol" module="SampleModule" index="11" force="false"&gt;g_Variable&lt;/import&gt;
631    ...
632</pre>
633    <h4>The <code>exports</code> Element</h4>
634    <p>The <code>exports</code> element is a collection of <code>export</code> elements. It has an arbitrary number of <code>export</code> child elements. It has the following attributes.<br />
635    </p>
636    <table border="1">
637      <thead>
638        <tr>
639          <th>Attribute<br />
640          </th>
641          <th>Value<br />
642          </th>
643          <th>Description<br />
644          </th>
645          <th>Omitted values</th>
646        </tr>
647      </thead>
648      <tbody>
649        <tr>
650          <th><CODE>type</CODE><br />
651          </th>
652          <td>Either <code>symbol</code>, <code>index</code>, or <code>offset</code>.<br />
653          </td>
654          <td>Specifies the export type of the symbol to export.<br /> <code>symbol</code>, <code>index</code>, and <code>offset</code> correspond respectively to symbol name, index, and offset.<br />
655          </td>
656          <td><code>symbol</code><br />
657          </td>
658        </tr>
659      </tbody>
660    </table>
661    <pre>    ...
662    &lt;exports type="index"&gt;
663        &lt;export&gt; ... &lt;/export&gt;
664        &lt;export&gt; ... &lt;/export&gt;
665        &lt;export&gt; ... &lt;/export&gt;
666    &lt;/exports&gt;
667    ...
668</pre>
669    <h4>The <code>export</code> Element
670    </h4>
671    <p>The <code>export</code> element specifies a symbol that is exported. This element specifies a symbol name to export. Each <code>export</code> element specifies one symbol. Symbol names must be mangled. It has the following attributes.<br />
672    </p>
673    <table border="1">
674      <thead>
675        <tr>
676          <th>Attribute<br />
677          </th>
678          <th>Value<br />
679          </th>
680          <th>Description<br />
681          </th>
682          <th>Omitted values</th>
683        </tr>
684      </thead>
685      <tbody>
686        <tr>
687          <th><CODE>auto</CODE><br />
688          </th>
689          <td><CODE>TRUE</CODE> or <CODE>FALSE</CODE> </td>
690          <td>Specifies whether the entry was generated automatically by the tool. <CODE>TRUE</CODE> indicates that it was generated automatically. </td>
691          <td><code><CODE>FALSE</CODE></code><br />
692          </td>
693        </tr>
694        <tr>
695          <th><CODE>function</CODE><br />
696          </th>
697          <td><CODE>TRUE</CODE> or <CODE>FALSE</CODE><br />
698          </td>
699          <td>Specifies whether the symbol is a function. <CODE>TRUE</CODE> indicates that it is a function.<br />
700          </td>
701          <td><code><CODE>FALSE</CODE></code><br />
702          </td>
703        </tr>
704        <tr>
705          <th><CODE>reference</CODE><br />
706          </th>
707          <td><CODE>TRUE</CODE> or <CODE>FALSE</CODE><br />
708          </td>
709          <td>Indicates whether the symbol is referenced from another module. <CODE>TRUE</CODE> indicates that it is referenced.<br />
710          </td>
711          <td><code><CODE>TRUE</CODE></code><br />
712          </td>
713        </tr>
714        <tr>
715          <th><CODE>index</CODE><br />
716          </th>
717          <td>A decimal number.<br />
718          </td>
719          <td>Specifies the index to use for exporting the symbol. Use this attribute if the export type of the symbol is <CODE>index</CODE>.<br />
720          </td>
721          <td>(None)<br />
722          </td>
723        </tr>
724        <tr>
725          <th><CODE>section</CODE><br />
726          </th>
727          <td>A decimal number.<br />
728          </td>
729          <td>Specifies the number of the section where the symbol is defined. Use this attribute if the export type of the symbol is <CODE>offset</CODE>.</td>
730          <td style="white-space: nowrap;">(None)<br />
731          </td>
732        </tr>
733        <tr>
734          <th><CODE>offset</CODE><br />
735          </th>
736          <td>A hexadecimal number.<br />
737          </td>
738          <td>Specifies the offset of the symbol definition location. Use this attribute if the export type of the symbol is <CODE>offset</CODE>.<br />
739          </td>
740          <td>(None)</td>
741        </tr>
742      </tbody>
743    </table>
744    <pre>    ...
745    &lt;export auto="false" function="false" reference="true" section="1" offset="00123456"&gt;g_Variable&lt;/export&gt;
746    ...
747</pre>
748    <h2><a name="h2_buildstep">SDK Build Steps</a></h2>
749    <p> This section describes the purpose of each build step in the SDK-conforming build system that is described in the <a href="BuildSystemDevelopmentGuideForDll.html" target="_parent">Build System Development Guide (for DLLs)</a>.&nbsp;</p>
750    <h3>Overall Summary<br />
751    </h3>
752    <p>The SDK build system is designed for easy use of <CODE>.ro</CODE>. To that end, it completes the following tasks.</p>
753    <ul>
754      <li>It automatically determines which symbols should be exported, and exports them.</li>
755      <li>It automatically determines which symbols should be referenced, and converts them to references.</li>
756    </ul>
757    <p> To complete these tasks, the SDK build system performs the following steps.</p>
758    <ul>
759      <li>Create a list of all symbols defined by the modules.<br />
760      </li>
761      <li>Create a list of all undefined symbols referenced by the modules.</li>
762      <li>Search out and reference the modules that have the definitions for these undefined symbols.</li>
763      <li>Export the symbols that are referenced from other modules.</li>
764    </ul>
765    <p> The general flow is as follows: </p>
766    <ol>
767      <li>Partially link module code.<br /> ↓<br />
768      </li>
769      <li>Create a list of symbols from the partial link file.<br /> ↓ </li>
770      <li>Compare references among modules, and select the references to export.<br /> ↓ </li>
771      <li>Create a command file with instructions for exporting and referencing for the linker.<br /> ↓ </li>
772      <li>Use this created command file to link.<br /> ↓ </li>
773      <li>Create the <CODE>.cro</CODE> file.</li>
774    </ol>
775    <p>  &nbsp; <br />
776    </p>
777    <h3><a name="partial_link">Partial Linking</a></h3>
778    <p> Partially link the object files that include the modules and combine them into a single ELF file that you can use in the next step to create a list of symbols. <br />
779    </p>
780    <p>The goal is to create a list with all of the symbols, but some symbols will be missing because of optimization and dead-code stripping of executable ELF files (such as those created by <a          href="#link_static_module">linking static modules</a> and <a href="#link_dynamic_module">linking dynamic modules</a>) and shared object ELF files. That is why partial linking is necessary.</p>
781    <p>To shorten processing time in the next step, the SDK libraries are removed from the targets of the linking. <br />
782    </p>
783    <h3><a name="listup">Create List of Symbols</a></h3>
784    <p>Create an <CODE>.xrl</CODE> file from the partial link file that was created in the previous step.</p>
785    <p>Check for symbols defined in the partial link file, and for symbols with undefined references. Then create an <CODE>.xrl</CODE> file, with the defined symbols set in <CODE>export</CODE> elements, and the undefined elements set in <CODE>import</CODE> elements.</p>
786    <p>For automatic export and referencing of symbols, list the symbols that can be provided by the modules, and all necessary symbols.<br />
787    </p>
788    <h3><a name="merge_undefined_symbol">Merge Undefined Symbols</a></h3>
789    <p>Update the <CODE>.xrl</CODE> file of the static module so that symbols that are referenced but not defined in any module are exported in the static module.<br />
790    </p>
791    <p>Check the <CODE>.xrl</CODE> files for all modules. If there are symbols in the <CODE>import</CODE> elements that are not in the <CODE>export</CODE> elements of any of the modules, add those symbols to the <CODE>export</CODE> element of the static module <CODE>.xrl</CODE> file. The following symbols are targeted.</p>
792    <ol>
793      <li>CRT symbols</li>
794      <li>SDK and other library symbols<br />
795      </li>
796      <li>Truly undefined symbols, because of a mistake or other reason</li>
797    </ol>
798    <p> If the target symbols are from group 1 or 2, they can be exported in the static module, because in the later step to <a href="#make_command_file">create a command file</a> the symbols are incorporated into the static module. If the target symbols are from group 3, they generate a link error because they cannot be found among the symbols that are supposed to be exported when <a          href="#link_static_module">linking the static module</a>. The generation of a link error helps to catch mistakes earlier in the process, because undefined symbols do not result in a link error when linking the dynamic module.</p>
799    <p>If CRT symbols cannot be listed when you <a href="#listup">create the list of symbols</a>, or if you do not list SDK symbols to shorten processing time, then these symbols are undefined in the <CODE>.xrl</CODE> file even if they are referenced. As a result, when you resolve symbol references during the next step, an undefined symbol error occurs.</p>
800    <p>Assuming that CRT symbols are included in the static module, and that the undefined symbols are among the three groups mentioned previously, you can handle this error by updating the <CODE>.xrl</CODE> file of the static module so that these symbols can be provided from the static module.</p>
801    <p>This process also collects information for recognizing the CRT symbols that should be loaded by the static module when <a href="#make_command_file">creating the command file</a>.<br />
802    </p>
803    <h3><a name="resolve_reference">Resolve Symbol References</a></h3>
804    <p>For the symbols referenced by the various modules, determine the module that defines each symbol, and register these reference sources in the <CODE>.xrl</CODE> file. To reference a symbol you need its export type, so you should also register the export type in the <CODE>.xrl</CODE> file.</p>
805    <p>At the same time, register the symbols that are defined by a module that are referenced by another module. Only the symbols that are registered as referenced by a module are exported. Symbols that are not referenced by any module become the targets of dead-code stripping. If the export type is <CODE>index</CODE>, assign an index number to the symbol that is referenced.<br />
806    </p>
807    <p>To <a href="#force_reference">force the references</a>, register the variable symbols that are defined in multiple modules. For variable symbols that are defined in multiple dynamic modules, delete the definitions in the <CODE>export</CODE> elements and add them to the <CODE>import</CODE> elements. In the static module, add the symbol definitions unconditionally to the <CODE>export</CODE> elements. This recommendation assumes that the static module holds the definitions for multiply-defined symbols.<br />
808    </p>
809    <h3><a name="make_command_file">Create Command File</a></h3>
810    <p>Create a command file for the linker to load the CRT symbols into the static module. </p>
811    <p>Some CRT symbols cannot be exported in the same way as other symbols. To export these symbols, you need to specify the linker option <code>--undefined_and_export</code> for each symbol that you are exporting. An <code>--undefined_and_export</code> option is generated for each symbol and exported as a command file. The phrase &quot;<I>some CRT symbols</I>&quot; is indeterminate and could change. Further, specifying the <code> --undefined_and_export</code> option for normal export symbols has no adverse effect. For these reasons, set this option for all export symbols in the static module.</p>
812    <h3><a name="make_stearing_file">Create Steering Files</a></h3>
813    <p>Create a steering file for the linker to export and reference symbols. </p>
814    <p>When symbols are exported and referenced automatically, the actual exporting and referencing occurs at link time. The steering file specifies the exporting and referencing of symbols to the linker at link time. In this step, the steering file is created for this purpose. In the steering file, <code>EXPORT</code> specifies a symbol for export, and <code>IMPORT</code> specifies a symbol for referencing.</p>
815    <p>Create the steering file based on the <CODE>.xrl</CODE> file after <a href="#resolve_reference">resolving symbol references</a>. Specify <code>EXPORT</code> for the symbols in the <CODE>export</CODE> elements that were registered as referenced from a module, and specify <code>IMPORT</code> for the symbols in the <CODE>import</CODE> elements.<br />
816    </p>
817    <h3><a name="link_static_module">Link Static Module</a></h3>
818    <p>Link and create the ELF file for the static module. Specify <a href="#make_command_file">the created command file</a> and <a href="#make_stearing_file">the created steering file</a>.</p>
819    <p>This step creates an ELF file that contains the appropriate definitions for CRT symbols and SDK library symbols, and the appropriate settings for symbol exporting and referencing.<br />
820    </p>
821    <p>The static module is created as an executable ELF file.<br />
822    </p>
823    <h3><a name="link_dynamic_module">Link Dynamic Modules</a></h3>
824    <p>Link and create an ELF file for the dynamic modules. Specify <a href="#make_stearing_file">the created steering file</a>.</p>
825    <p>This step creates an ELF file with the appropriate settings for symbol exporting and referencing.<br />
826    </p>
827    <p>The dynamic modules are created as a shared object ELF file.</p>
828    <h3><a name="replace_reference">Replace References</a></h3>
829    <p>Replace code in the static module so that references to unlinked symbols reference <CODE>nnroUnresolved</CODE> instead.</p>
830    <h3><a name="make_command_file2">Create Command File 2</a></h3>
831    <p>Create a command file for <code>fromelf</code> to force the reference to the static modules for variable symbols that are multiply defined.</p>
832    <p>Variables such as class member variables for the template class have a definition in every module, and they are linked so that the definition inside a module is used from inside that module. Thus, what is essentially a single variable is defined as multiple variables, and processes do not work as expected. To avoid this problem, perform the next step to <a          href="#force_reference">force the references</a> so that every module references the definition in the static module. In this step, a command file is created for that purpose. </p>
833    <p>To force the references, specify the <code>--force_import</code> option for each symbol. A <code>--force_import</code> option is generated for every symbol marked in the <a          href="#resolve_reference">Resolve Symbol References</a> step, and this is exported as a command file.<br />
834    </p>
835    <h3><a name="force_reference">Force References</a></h3>
836    <p>Update the ELF file for the static module, specifying the command file that was created in the previous step (<a href="#make_command_file2">command file 2</a>).</p>
837    <p>This step ensures that the symbols in the static module are referenced wherever multiply defined symbols are used.<br />
838    </p>
839    <h3><a name="resolved_offset">Resolve Offsets</a></h3>
840    <p>Get the offsets for exported symbols from each ELF file, and register them in the <CODE>.xrl</CODE> file.</p>
841    <p>To reference a symbol of export type <CODE>offset</CODE>, you need the symbol offset. In this step, you request cache the offset for each symbol so that it is available as needed from other modules.</p>
842    <p>This step ensures that even if symbols of export type <CODE>offset</CODE> are referenced, you can create the <CODE>.cro</CODE> file without the ELF file of the referencing module.<br />
843    </p>
844    <h3><a name="make_crs">Create the <CODE>.crs</CODE> File</a></h3>
845    <p>Create the <CODE>.crs</CODE> file from the ELF file of the static module, and also create the corresponding <CODE>.xrl</CODE> files and all other <CODE>.xrl</CODE> files.</p>
846    <p>The <CODE>.xrl</CODE> files that do not correspond to the static module are used to reference the offsets of the symbols that are referenced.<br />
847    </p>
848    <h3><a name="make_cro">Create the <CODE>.cro</CODE> File</a></h3>
849    <p>Create the <CODE>.cro</CODE> file from the ELF file of the dynamic modules, and also create the corresponding <CODE>.xrl</CODE> files and all other <CODE>.xrl</CODE> files. Create the <CODE>.rlt</CODE> file at the same time.<br />
850    </p>
851    <p>The <CODE>.xrl</CODE> files that do not correspond to the <CODE>.cro</CODE> file that is created are used to reference the offsets of the symbols that are referenced.</p>
852    <h3><a name="make_crr">Create the <CODE>.crr</CODE> File</a></h3>
853    <p>Create the <CODE>.crr</CODE> file from the <CODE>.rlt</CODE> file. </p>
854    <h2><a name="h2_makecro">Features of the <CODE>makecro</CODE> Tool</a></h2>
855    <p>This section provides a detailed description of the features of the <CODE><a href="../../tools/ctr_makecro.html">makecro</a></CODE> tool.<br />
856    </p>
857    <h3>Create the <CODE>.cro</CODE> or <CODE>.crs</CODE> File</h3>
858    <p>Creates a <CODE>.cro</CODE> file or <CODE>.crs</CODE> file from the ELF files and the <CODE>.xrl</CODE> files.</p>
859    <p>The type of the ELF file determines whether the created file is a <CODE>.cro</CODE> or <CODE>.crs</CODE> file. If it is an executable ELF file, the tool creates a <CODE>.crs</CODE> file. If it is a shared object ELF file, a <CODE>.cro</CODE> file is created.<br />
860    </p>
861    <p>The following symbols become export symbols.</p>
862    <ul>
863      <li>Symbols in the static symbol table of the ELF file that satisfy the following conditions.</li>
864      <ul>
865        <li>Not undefined.</li>
866        <li>The binding is <code>STB_GLOBAL</code> or <code>STB_WEAK</code>.<br />
867        </li>
868        <li>Visibility is <code>STV_DEFAULT</code>.<br />
869        </li>
870      </ul>
871    </ul>
872    <p>The following symbols become reference symbols.</p>
873    <ul>
874      <li>Symbols in the static symbol table of the ELF file that satisfy the following conditions.
875        <ul>
876          <li>Undefined.</li>
877          <li>Referenced from dynamic relocation tables.</li>
878        </ul>
879        An error results if the <CODE>import</CODE> element of a corresponding symbol is not in the <CODE>.xrl</CODE> file.<br />
880      </li>
881    </ul>
882    <p>Note that the <CODE>.xrl</CODE> file has nothing to do with whether a symbol is for export or for referencing. The <CODE>.xrl</CODE> file is used to reference the export types of symbols and their index or offset values.<br />
883    </p>
884    <p>In the SDK build system, this feature is used for the <a href="#make_cro">Create CRO File</a> and <a href="#make_crs">Create CRS File</a> steps.<br />
885    </p>
886    <h3>Create the <CODE>.xrl</CODE> File (-l)</h3>
887    <p>Creates an <CODE>.xrl</CODE> file from the ELF files, based on the symbols that are defined and referenced in the ELF files.</p>
888    <p>The following processes are performed.</p>
889    <ol>
890      <li>Creates a list of symbols in the ELF symbol table, excluding the debugging symbols.<br />
891      </li>
892      <li>Creates a list of the symbols from the first list that are not set to <code>STB_LOCAL</code> binding and are undefined.</li>
893      <li>Creates a list of the symbols from the first list that are not set to <code>STB_LOCAL</code> binding and are not undefined.</li>
894      <li>Creates and exports the following kind of <CODE>.xrl</CODE> file.</li>
895      <ol>
896        <li>The root contains the <code>module</code> element.</li>
897        <li>The <code>module</code> element contains one <CODE>moduleInfo</CODE> element, one <CODE>imports</CODE> element, and one <CODE>exports</CODE> element.</li>
898        <li>The <code>name</code> attribute of the <CODE>moduleInfo</CODE> element is set to the file name of the ELF file without the extension.</li>
899        <li>The <CODE>imports</CODE> element contains <CODE>import</CODE> elements that contain the names of each symbol that is listed in the second list.</li>
900        <li>For each <CODE>import</CODE> element, the <CODE>auto</CODE> attribute is set to <CODE>FALSE</CODE> if the corresponding symbol is set to <code>STV_DEFAULT</code> in the ELF symbol table. Otherwise, the <CODE>auto</CODE> attribute is set to <CODE>TRUE</CODE>.</li>
901        <li>The  <CODE>exports</CODE> element has a <CODE>type</CODE> attribute that is set based on the specification of a command line option, and it contains <CODE>export</CODE> elements that contain the names of each symbol listed in the third list.</li>
902        <li>For each <CODE>export</CODE> element, the <CODE>auto</CODE> attribute is set to <CODE>FALSE</CODE> if the corresponding symbol is set to <code>STV_PROTECTED</code> in the ELF symbol table. Otherwise, the <CODE>auto</CODE> attribute is set to <CODE>TRUE</CODE>.</li>
903        <li>Each <CODE>export</CODE> element is set to <CODE>TRUE</CODE> if its corresponding symbol is type <code>STT_FUNC</code>. Otherwise, it is set to <CODE>FALSE</CODE>.
904        </li>
905      </ol>
906    </ol>
907    <p>In the SDK build system, this feature is used for the <a href="#listup">Create List of Symbols</a> step.<br />
908    </p>
909    <h3>Replace Unresolved Symbols (-u)</h3>
910    <p>Creates one ELF file from another ELF file, using a specified symbol address to replace parts of the code where the addresses of unresolved symbols were used.</p>
911    <p>In the SDK build system, this feature is used for the <a href="#replace_reference">Replace References</a> step.</p>
912    <h3>Merge Undefined Symbols (-c)</h3>
913    <p>Takes one <CODE>.xrl</CODE> file that serves as the base (the &quot;base <CODE>.xrl</CODE> file&quot;) and several other <CODE>.xrl</CODE> files (the &quot;reference <CODE>.xrl</CODE> files&quot;), and uses them to create an <CODE>.xrl</CODE> file with many <CODE>export</CODE> elements added to the base.</p>
914    <p>The following processes are performed.</p>
915    <ol>
916      <li>Creates a list of the <CODE>import</CODE> elements in the reference <CODE>.xrl</CODE> files that set their <CODE>auto</CODE> attribute to <CODE>TRUE</CODE> and do not exist with the same symbol name in the <CODE>export</CODE> elements of the specified base <CODE>.xrl</CODE> file.</li>
917      <li>Creates and exports an <CODE>.xrl</CODE> file that has the following kinds of additions to the base <CODE>.xrl</CODE> file.<br />
918      </li>
919      <ol>
920        <li>Symbols from the list created in step 1 are added to the <CODE>export</CODE> elements. But the symbols are not added if they already exist as <CODE>export</CODE> elements in the base <CODE>.xrl</CODE> file.<br />
921        </li>
922        <li><CODE>import</CODE> elements with their <CODE>auto</CODE> attribute set to <CODE>TRUE</CODE> are deleted.<br />
923        </li>
924      </ol>
925    </ol>
926    <p>In the SDK build system, this feature is used for the <a href="#merge_undefined_symbol">Merge Undefined Symbols</a> step.<br />
927    </p>
928    <h3>Resolve References (-f)</h3>
929    <p>Takes one <CODE>.xrl</CODE> file that serves as the base (the &quot;base <CODE>.xrl</CODE> file&quot;) and several other <CODE>.xrl</CODE> files (the &quot;reference <CODE>.xrl</CODE> files&quot;), and uses them to create an <CODE>.xrl</CODE> file with updated reference information and export information.</p>
930    <p>The following processes are performed.</p>
931    <ol>
932      <li>Performs the following processes on all <CODE>export</CODE> elements that are contained in all specified <CODE>.xrl</CODE> files.</li>
933      <ol>
934        <li>Search the specified <CODE>.xrl</CODE> files for symbols of the same names that are contained in the <CODE>import</CODE> elements.</li>
935        <li>If no symbols are found, set the <code>reference</code> attribute of the <CODE>export</CODE> elements to <CODE>FALSE</CODE>.</li>
936      </ol>
937      <li>Performs the following processes on <CODE>exports</CODE> elements that are contained in all specified <CODE>.xrl</CODE> files for which the <CODE>type</CODE> attribute is set to <CODE>index</CODE>.</li>
938      <ol>
939        <li>Create a list of all child <CODE>export</CODE> elements with a <code>reference</code> attribute set to <CODE>TRUE</CODE>.</li>
940        <li>Set the <CODE>index</CODE> attribute values for the <CODE>export</CODE> elements that are listed in step 1 to numeric values, starting with 0 and incrementing by one in the order that they are listed.<br />
941        </li>
942      </ol>
943      <li>Performs the following processes on all <CODE>import</CODE> elements that are contained in all specified <CODE>.xrl</CODE> files.
944        <ol>
945          <li>Search the specified <CODE>.xrl</CODE> files for symbols with the same names as the symbols contained in the <CODE>export</CODE> elements.</li>
946          <li>Generate an error if no symbols are found in step 1.<br />
947          </li>
948          <li>Set the <CODE>type</CODE> attribute of the original <CODE>import</CODE> element to the <CODE>type</CODE> attribute of the <CODE>exports</CODE> element that contains the <CODE>export</CODE> element found in step 1.</li>
949          <li>If the <CODE>type</CODE> attribute of the <CODE>exports</CODE> element that contains the <CODE>export</CODE> element found in step 1 is <CODE>index</CODE>, then set the <CODE>index</CODE> attribute of the original <CODE>import</CODE> element to the <CODE>index</CODE> attribute of the <CODE>export</CODE> element.</li>
950          <li>Set the value of the <CODE>module</CODE> attribute of the original <CODE>import</CODE> element to the value of the <CODE>name</CODE> attribute of the <CODE>moduleInfo</CODE> element in the <CODE>.xrl</CODE> file that contains the <CODE>export</CODE> element found in step 1.</li>
951        </ol>
952      </li>
953      <li>Exports the <CODE>.xrl</CODE> file that results from making these changes to the base <CODE>.xrl</CODE> file.</li>
954    </ol>
955    <p>In the SDK build system, this feature is used for the <a href="#resolve_reference">Resolve References</a> step.<br />
956    </p>
957    <h3>Merge (-m)</h3>
958    <p>Merges the contents of two <CODE>.xrl</CODE> files.</p>
959    <p>The merging uses the following rules.</p>
960    <ul>
961      <li>If the <CODE>name</CODE> attribute of the <code>moduleInfo</code> element is specified on the command line, use that value. If not, use the value of the <CODE>.xrl</CODE> file that is specified first on the command line.<br />
962      </li>
963      <li>If the <CODE>-g</CODE> option is specified and the same symbol is defined in both files, perform the following steps.</li>
964      <ul>
965        <li>If the <CODE>auto</CODE> attribute of the <CODE>import</CODE> element is <CODE>TRUE</CODE> in both files, set the value for the attribute of the merged file to <CODE>TRUE</CODE>. Otherwise, set the value to <CODE>FALSE</CODE>.</li>
966        <li>If the <CODE>auto</CODE> attribute of the <CODE>export</CODE> element is <CODE>TRUE</CODE> in both files, set the value to <CODE>TRUE</CODE>. Otherwise, set the value to <CODE>FALSE</CODE>.</li>
967        <li>For all other attributes, use the value in the <CODE>.xrl</CODE> file that is specified first on the command line.<br />
968        </li>
969      </ul>
970      <li>Generate an error if the <CODE>reference</CODE> attribute is set for the <CODE>export</CODE> element.</li>
971    </ul>
972    <p>This feature is not used in the SDK build system.<br />
973    </p>
974    <h3>Register Offsets (-p)</h3>
975    <p>Creates an <CODE>.xrl</CODE> file with offsets provided from the ELF and <CODE>.xrl</CODE> files.</p>
976    <p>The following processes are performed.</p>
977    <ol>
978      <li>Creates a list of <CODE>export</CODE> elements in the specified <CODE>.xrl</CODE> files that have the <CODE>reference</CODE> attribute set to <CODE>TRUE</CODE>.</li>
979      <li>For each symbol in this list, gets the section number and the offset from the start of the section, as defined for the symbol in the ELF file.</li>
980      <li>Creates an <CODE>.xrl</CODE> file from the specified <CODE>.xrl</CODE> files, with the values obtained in step 2 set for the <CODE>section</CODE> and <CODE>offset</CODE> attributes of the <CODE>export</CODE> element for each symbol in the list.
981      </li>
982    </ol>
983    <p>In the SDK build system, this feature is used for the <a href="#resolved_offset">Resolve Offsets</a> step.<br />
984    </p>
985    <h3>Create the Steering File (-s)</h3>
986    <p>Creates a steering file for <CODE>armlink</CODE> from the <CODE>.xrl</CODE> file.</p>
987    <p>Creates an <CODE>EXPORT</CODE> command for the <CODE>export</CODE> elements in the <CODE>.xrl</CODE> file that have the <CODE>reference</CODE> attribute set to <CODE>TRUE</CODE>, and creates an <CODE>IMPORT</CODE> command for all <CODE>import</CODE> elements.<br />
988    </p>
989    <p>In the SDK build system, this feature is used for the <a href="#make_stearing_file">Create Steering File</a> step.<br />
990    </p>
991    <h3>Create a Command File to Force Export (-x)</h3>
992    <p>Creates a command file for <CODE>armlink</CODE> from the <CODE>.xrl</CODE> file.</p>
993    <p>Creates an <CODE>--undefined_and_export</CODE> command for the <CODE>export</CODE> elements in the <CODE>.xrl</CODE> file that have the <CODE>reference</CODE> attribute set to <CODE>TRUE</CODE>.<br />
994    </p>
995    <p>In the SDK build system, this feature is used for the <a href="#make_command_file">Create Command File</a> step.<br />
996    </p>
997    <h3>Create a Command File to Force Import (-w)</h3>
998    <p>Creates a command file for <CODE>fromelf</CODE> from the <CODE>.xrl</CODE> file.</p>
999    <p>Creates a <CODE>--force_import</CODE> command for the <CODE>import</CODE> elements in the <CODE>.xrl</CODE> file that have the <CODE>force</CODE> attribute set to <CODE>TRUE</CODE>.<br />
1000    </p>
1001    <p>In the SDK build system, this feature is used for the <a href="#make_command_file2">Create Command File 2</a> step.<br /></p>
1002    <h3>Relationship Between <CODE>.xrl</CODE> and <CODE>makecro</CODE> Features</h3>
1003    <p>This section provides several tables of information that show how the <CODE>makecro</CODE> features use the attribute values of the elements in the <CODE>.xrl</CODE> files, and the kinds of values that are set as a result.</p>
1004    <p>In these tables, <B>Base</B> shows how the attribute values of the base <CODE>.xrl</CODE> file are used. <B>Input</B> shows how the values of the other <CODE>.xrl</CODE> files are used. <B>Output</B> shows how the values that are inherited from <B>Base</B> and <B>Input</B> are changed in the <CODE>.xrl</CODE> file that is created by <CODE>makecro</CODE>. <B>Added</B> shows the values that are set for newly added elements.</p>
1005    <p>A dashed line ( <B>--</B> ) in a table indicates that a value is not referenced or not changed. <B>None</B> indicates that no explicit attribute value is set for the element. <br />
1006    </p>
1007    <h4><CODE>import</CODE> Elements<br />
1008    </h4>
1009    <table border="1">
1010      <tbody>
1011        <tr>
1012          <th rowspan="1" colspan="2">Feature \ Attribute<br />
1013          </th>
1014          <th><CODE>auto</CODE><br />
1015          </th>
1016          <th><CODE>type</CODE><br />
1017          </th>
1018          <th><CODE>module</CODE><br />
1019          </th>
1020          <th><CODE>index</CODE><br />
1021          </th>
1022          <th><CODE>force</CODE><br />
1023          </th>
1024        </tr>
1025        <tr>
1026          <th>Create (-l)</th>
1027          <th style="background-color: #eeeeff;">Output</th>
1028          <td align="center" style="background-color: #eeeeff;">If <code>STV_DEFAULT</code>, then <CODE>FALSE</CODE>.<br />
1029          </td>
1030          <td align="center" colspan="4" rowspan="1" style="background-color: #eeeeff;">None</td>
1031        </tr>
1032        <tr>
1033          <th rowspan="2" colspan="1">Merge (-m)</th>
1034          <th style="background-color: #eeffee;">Input</th>
1035          <td align="center" style="background-color: #eeeeee;">--<br />
1036          </td>
1037          <td align="center" rowspan="5" colspan="1" style="background-color: #eeeeee;">--</td>
1038          <td align="center" rowspan="5" colspan="1" style="background-color: #eeeeee;">--</td>
1039          <td align="center" rowspan="5" colspan="1" style="background-color: #eeeeee;">--</td>
1040          <td align="center" rowspan="5" colspan="1" style="background-color: #eeeeee;">--</td>
1041        </tr>
1042        <tr>
1043          <th style="background-color: #eeeeff;">Output</th>
1044          <td style="background-color: #eeeeff;">If the <CODE>auto</CODE> attribute values are <CODE>TRUE</CODE> for all <CODE>input</CODE> elements, then <CODE>TRUE</CODE>.</td>
1045        </tr>
1046        <tr>
1047          <th colspan="1" rowspan="4">Merge Undefined (-c)</th>
1048          <th style="background-color: #ddffdd; white-space: nowrap;">Base</th>
1049          <td align="center" style="background-color: #ddffdd;">Not exported if <CODE>TRUE</CODE>.<br />
1050          </td>
1051        </tr>
1052        <tr>
1053          <th style="background-color: #eeffee;">Input</th>
1054          <td align="center" colspan="1" rowspan="2" style="background-color: #eeeeee;">--</td>
1055        </tr>
1056        <tr>
1057          <th style="background-color: #eeeeff;">Output</th>
1058        </tr>
1059        <tr>
1060          <th style="background-color: #ddddff;">Added</th>
1061          <td align="center" colspan="5" rowspan="1" style="background-color: #ddddff;">None</td>
1062        </tr>
1063        <tr>
1064          <th colspan="1" rowspan="4">Resolve References (-f)</th>
1065          <th style="background-color: #ddffdd;">Base</th>
1066          <td align="center" colspan="1" rowspan="3" style="background-color: #eeeeee;">--<br />
1067          </td>
1068          <td style="background-color: #eeeeee;" rowspan="2" colspan="1"><br />
1069          </td>
1070          <td style="background-color: #eeeeee;" rowspan="2" colspan="1">--</td>
1071          <td align="center" style="background-color: #eeeeee;" rowspan="2"
1072
1073            colspan="1">--</td>
1074          <td align="center" style="background-color: #eeeeee;" colspan="1"
1075
1076            rowspan="3">--<br />
1077          </td>
1078        </tr>
1079        <tr>
1080          <th style="background-color: #eeffee;">Input</th>
1081        </tr>
1082        <tr>
1083          <th style="background-color: #eeeeff;">Output</th>
1084          <td align="center" style="background-color: #eeeeff;">Sets the <CODE>type</CODE> for the parent <CODE>exports</CODE> of the corresponding <CODE>export</CODE> element.<br />
1085          </td>
1086          <td align="center" style="background-color: #eeeeff;">Sets the <CODE>name</CODE> of <CODE>moduleInfo</CODE> for the <CODE>module</CODE> contained in the corresponding <CODE>export</CODE> element.<br />
1087          </td>
1088          <td style="background-color: #eeeeff;">Sets the <CODE>index</CODE> of the corresponding <CODE>export</CODE> element.<br />
1089          </td>
1090        </tr>
1091        <tr>
1092          <th style="background-color: #ddddff;">Added</th>
1093          <td align="center" colspan="4" rowspan="1" style="background-color: #ddddff;">None.<br />
1094          </td>
1095          <td align="center" style="background-color: #ddddff;"><CODE>TRUE</CODE><br />
1096          </td>
1097        </tr>
1098        <tr>
1099          <th colspan="1" rowspan="2">Offsets (-p)</th>
1100          <th style="background-color: #eeffee;">Input</th>
1101          <td align="center" colspan="1" rowspan="6" style="background-color: #eeeeee;">--</td>
1102          <td align="center" rowspan="5" colspan="1" style="background-color: #eeeeee;">--<br />
1103          </td>
1104          <td align="center" rowspan="5" colspan="1" style="background-color: #eeeeee;">--</td>
1105          <td align="center" rowspan="5" colspan="1" style="background-color: #eeeeee;">--</td>
1106          <td align="center" rowspan="4" colspan="1" style="background-color: #eeeeee;">--</td>
1107        </tr>
1108        <tr>
1109          <th style="background-color: #eeeeff;">Output</th>
1110        </tr>
1111        <tr>
1112          <th>-s<br />
1113          </th>
1114          <th style="background-color: #eeffee;">Input</th>
1115        </tr>
1116        <tr>
1117          <th>-x<br />
1118          </th>
1119          <th style="background-color: #eeffee;">Input</th>
1120        </tr>
1121        <tr>
1122          <th>-w<br />
1123          </th>
1124          <th style="background-color: #eeffee;">Input</th>
1125          <td align="center" style="background-color: #eeffee;">Only for those set to <CODE>TRUE</CODE>.</td>
1126        </tr>
1127        <tr>
1128          <th><CODE>.cro</CODE><br />
1129          </th>
1130          <th style="background-color: #eeffee;">Input</th>
1131          <td align="center" style="background-color: #eeffee;">Used as the export type of the reference target.</td>
1132          <td align="center" colspan="2" rowspan="1" style="background-color: #eeffee;">Used as information for the reference target.</td>
1133          <td align="center" style="background-color: #eeeeee;">--</td>
1134        </tr>
1135      </tbody>
1136    </table>
1137    <h4> <CODE>export</CODE> Elements<br />
1138    </h4>
1139    <table border="1">
1140      <tbody>
1141        <tr>
1142          <th rowspan="1" colspan="2">Feature \ Attribute </th>
1143          <th><CODE>auto</CODE><br />
1144          </th>
1145          <th><CODE>function</CODE><br />
1146          </th>
1147          <th><CODE>reference</CODE><br />
1148          </th>
1149          <th><CODE>index</CODE><br />
1150          </th>
1151          <th><CODE>section</CODE><br />
1152          </th>
1153          <th><CODE>offset</CODE><br />
1154          </th>
1155        </tr>
1156        <tr>
1157          <th>Create (-l)</th>
1158          <th style="background-color: #eeeeff;">Output</th>
1159          <td align="center" style="background-color: #eeeeff;">If <code>STV_PROCETED</code>, then <CODE>FALSE</CODE>.
1160          </td>
1161          <td align="center" style="background-color: #eeeeff;">If <code>STT_FUNC</code>, then <CODE>TRUE</CODE>.<br />
1162          </td>
1163          <td align="center" colspan="4" rowspan="1" style="background-color: #eeeeff;">None</td>
1164        </tr>
1165        <tr>
1166          <th colspan="1" rowspan="2">Merge (-m)</th>
1167          <th style="background-color: #eeffee;">Input</th>
1168          <td align="center" style="background-color: #eeeeee;">--</td>
1169          <td align="center" style="background-color: #eeeeee;" colspan="1"
1170
1171            rowspan="5">--<br />
1172          </td>
1173          <td style="background-color: #eeffee;">Error if the attribute exists.</td>
1174          <td align="center" style="background-color: #eeeeee;" colspan="1"
1175
1176            rowspan="5">--</td>
1177          <td align="center" style="background-color: #eeeeee;" colspan="1"
1178
1179            rowspan="5">--</td>
1180          <td align="center" style="background-color: #eeeeee;" colspan="1"
1181
1182            rowspan="5">--</td>
1183        </tr>
1184        <tr>
1185          <th style="background-color: #eeeeff;">Output</th>
1186          <td style="background-color: #eeeeff;">If the <CODE>auto</CODE> attribute values are <CODE>TRUE</CODE> for all <CODE>input</CODE> elements, then <CODE>TRUE</CODE>.</td>
1187          <td align="center" style="background-color: #eeeeee;" colspan="1"
1188
1189            rowspan="4">--</td>
1190        </tr>
1191        <tr>
1192          <th colspan="1" rowspan="4">Merge Undefined (-c)</th>
1193          <th style="background-color: #ddffdd; white-space: nowrap;">Base</th>
1194          <td align="center" colspan="1" rowspan="1" style="background-color: #eeeeee;">--</td>
1195        </tr>
1196        <tr>
1197          <th style="background-color: #eeffee;">Input</th>
1198          <td align="center" style="background-color: #eeffee;">If <CODE>FALSE</CODE>, then not a merge target.<br />
1199          </td>
1200        </tr>
1201        <tr>
1202          <th style="background-color: #eeeeff;">Output</th>
1203          <td align="center" style="background-color: #eeeeff;" colspan="1">If the <CODE>auto</CODE> attribute of <CODE>Base</CODE> is <CODE>FALSE</CODE>, then <CODE>FALSE</CODE>.<br />
1204          </td>
1205        </tr>
1206        <tr>
1207          <th style="background-color: #ddddff;">Added</th>
1208          <td align="center" style="background-color: #ddddff;"><CODE>TRUE</CODE><br />
1209          </td>
1210          <td align="center" colspan="5" rowspan="1" style="background-color: #ddddff;">None</td>
1211        </tr>
1212        <tr>
1213          <th colspan="1" rowspan="4">Resolve References (-f)</th>
1214          <th style="background-color: #ddffdd;">Base</th>
1215          <td align="center" style="background-color: #ddffdd;" colspan="1">If <CODE>FALSE</CODE>, then the <CODE>reference</CODE> attribute is not set to <CODE>FALSE</CODE>.<br />
1216          </td>
1217          <td align="center" style="background-color: #ddffdd;" colspan="1">If <CODE>TRUE</CODE>, ignore multiple definitions.<br />
1218          </td>
1219          <td align="center" style="background-color: #eeeeee;" rowspan="2"
1220
1221            colspan="1">--</td>
1222          <td align="center" style="background-color: #eeeeee;" rowspan="2"
1223
1224            colspan="1">--</td>
1225          <td align="center" style="background-color: #eeeeee;" rowspan="3"
1226
1227            colspan="1">--<br />
1228          </td>
1229          <td align="center" style="background-color: #eeeeee;" colspan="1"
1230
1231            rowspan="3">--</td>
1232        </tr>
1233        <tr>
1234          <th style="background-color: #eeffee;">Input</th>
1235          <td align="center" style="background-color: #eeffee;" colspan="1">If <CODE>FALSE</CODE>, then the <CODE>reference</CODE> attribute is not set to <CODE>FALSE</CODE>.</td>
1236          <td align="center" style="background-color: #eeffee;" colspan="1">If <CODE>TRUE</CODE>, ignore multiple definitions.</td>
1237        </tr>
1238        <tr>
1239          <th style="background-color: #eeeeff;">Output</th>
1240          <td align="center" colspan="1" rowspan="1" style="background-color: #eeeeee;">--<br />
1241          </td>
1242          <td align="center" style="background-color: #eeeeee;">--</td>
1243          <td align="center" style="background-color: #eeeeff;"><CODE>FALSE</CODE> set for those not referenced.</td>
1244          <td align="center" style="background-color: #eeeeff;">Serial number set for those referenced.</td>
1245        </tr>
1246        <tr>
1247          <th style="background-color: #ddddff;">Added</th>
1248          <td align="center" colspan="6" rowspan="1" style="background-color: #ddddff;">None</td>
1249        </tr>
1250        <tr>
1251          <th colspan="1" rowspan="2">Offsets (-p)</th>
1252          <th style="background-color: #eeffee;">Input</th>
1253          <td align="center" colspan="1" rowspan="6" style="background-color: #eeeeee;">-- </td>
1254          <td align="center" style="background-color: #eeeeee;" rowspan="6">--<br />
1255          </td>
1256          <td align="center" style="background-color: #eeffee;">Only for those set to <CODE>TRUE</CODE>.</td>
1257          <td align="center" style="background-color: #eeeeee;" rowspan="5">--<br />
1258          </td>
1259          <td align="center" style="background-color: #eeeeee;">--<br />
1260          </td>
1261          <td align="center" style="background-color: #eeeeee;">--<br />
1262          </td>
1263        </tr>
1264        <tr>
1265          <th style="background-color: #eeeeff;">Output</th>
1266          <td align="center" style="background-color: #eeeeee;" colspan="1">--</td>
1267          <td align="center" colspan="2" rowspan="1" style="background-color: #eeeeff;">Set value obtained from ELF.</td>
1268        </tr>
1269        <tr>
1270          <th>-s<br />
1271          </th>
1272          <th style="background-color: #eeffee;">Input</th>
1273          <td align="center" style="background-color: #eeffee;">Only for those set to <CODE>TRUE</CODE>.</td>
1274          <td align="center" style="background-color: #eeeeee;" rowspan="3"
1275
1276            colspan="1">--</td>
1277          <td align="center" style="background-color: #eeeeee;" colspan="1"
1278
1279            rowspan="3">--</td>
1280        </tr>
1281        <tr>
1282          <th>-x<br />
1283          </th>
1284          <th style="background-color: #eeffee;">Input</th>
1285          <td align="center" style="background-color: #eeffee;">Only for those set to <CODE>TRUE</CODE>.</td>
1286        </tr>
1287        <tr>
1288          <th>-w<br />
1289          </th>
1290          <th style="background-color: #eeffee;">Input</th>
1291          <td align="center" style="background-color: #eeeeee;" rowspan="2"
1292
1293            colspan="1">--</td>
1294        </tr>
1295        <tr>
1296          <th><CODE>.cro</CODE><br />
1297          </th>
1298          <th style="background-color: #eeffee;">Input</th>
1299          <td align="center" colspan="3" rowspan="1" style="background-color: #eeffee;">Used as information when exporting.</td>
1300        </tr>
1301      </tbody>
1302    </table>
1303    <h4><CODE>moduleInfo</CODE> Elements and <CODE>exports</CODE> Elements<br />
1304    </h4>
1305    <table border="1">
1306      <tbody>
1307        <tr>
1308          <th rowspan="2" colspan="2">Feature \ Attribute </th>
1309          <th colspan="1" rowspan="1"><CODE>moduleInfo</CODE><br />
1310          </th>
1311          <th><CODE>exports</CODE><br />
1312          </th>
1313        </tr>
1314        <tr>
1315          <th>name<br />
1316          </th>
1317          <th><CODE>type</CODE><br />
1318          </th>
1319        </tr>
1320        <tr>
1321          <th>Create (-l)</th>
1322          <th style="background-color: #eeeeff;">Output</th>
1323          <td align="center" style="background-color: #eeeeff;">Set the ELF file name.<br />
1324          </td>
1325          <td align="center" colspan="1" rowspan="1" style="background-color: #eeeeff;">Set the value specified by the command line.<br />
1326          </td>
1327        </tr>
1328        <tr>
1329          <th rowspan="2" colspan="1">Merge (-m)</th>
1330          <th style="background-color: #eeffee;">Input</th>
1331          <td align="center" style="background-color: #eeeeee;">--<br />
1332          </td>
1333          <td align="center" style="background-color: #eeeeee;" rowspan="5">--<br />
1334          </td>
1335        </tr>
1336        <tr>
1337          <th style="background-color: #eeeeff;">Output</th>
1338          <td style="background-color: #eeeeff;">Set the command line specification or the value of the first input file.</td>
1339        </tr>
1340        <tr>
1341          <th colspan="1" rowspan="4">Merge Undefined (-c)</th>
1342          <th style="background-color: #ddffdd; white-space: nowrap;">Base</th>
1343          <td align="center" colspan="1" rowspan="4" style="background-color: #eeeeee;">--<br />
1344          </td>
1345        </tr>
1346        <tr>
1347          <th style="background-color: #eeffee;">Input</th>
1348        </tr>
1349        <tr>
1350          <th style="background-color: #eeeeff;">Output</th>
1351        </tr>
1352        <tr>
1353          <th style="background-color: #ddddff;">Add<br />
1354          </th>
1355          <td style="background-color: #ddddff;">Set the value specified by the command line.<br />
1356          </td>
1357        </tr>
1358        <tr>
1359          <th colspan="1" rowspan="4">Resolve References (-f)</th>
1360          <th style="background-color: #ddffdd;">Base</th>
1361          <td align="center" style="background-color: #ddffdd;" colspan="1">Use as the value for the <code>module</code> attribute of the <CODE>import</CODE> element.<br />
1362          </td>
1363          <td align="center" style="background-color: #ddffdd;" rowspan="1"
1364
1365            colspan="1">Use as the value for the <code>type</code> attribute of the <CODE>import</CODE> element. </td>
1366        </tr>
1367        <tr>
1368          <th style="background-color: #eeffee;">Input</th>
1369          <td align="center" style="background-color: #eeffee;" colspan="1">Use as the value for the <code>module</code> attribute of the <CODE>import</CODE> element.</td>
1370          <td align="center" style="background-color: #eeffee;" rowspan="1"
1371
1372            colspan="1">Use as the value for the <code>type</code> attribute of the <CODE>import</CODE> element. </td>
1373        </tr>
1374        <tr>
1375          <th style="background-color: #eeeeff;">Output</th>
1376          <td align="center" style="background-color: #eeeeee;" rowspan="7"
1377
1378            colspan="1">--</td>
1379          <td align="center" style="background-color: #eeeeee;">--<br />
1380          </td>
1381        </tr>
1382        <tr>
1383          <th style="background-color: #ddddff;">Add<br />
1384          </th>
1385          <td align="center" style="background-color: #ddddff;">None.<br />
1386          </td>
1387        </tr>
1388        <tr>
1389          <th colspan="1" rowspan="2">Offsets (-p)</th>
1390          <th style="background-color: #eeffee;">Input</th>
1391          <td rowspan="5" colspan="1" style="background-color: #eeeeee;">--<br />
1392          </td>
1393        </tr>
1394        <tr>
1395          <th style="background-color: #eeeeff;">Output</th>
1396        </tr>
1397        <tr>
1398          <th>-s<br />
1399          </th>
1400          <th style="background-color: #eeffee;">Input</th>
1401        </tr>
1402        <tr>
1403          <th>-x<br />
1404          </th>
1405          <th style="background-color: #eeffee;">Input</th>
1406        </tr>
1407        <tr>
1408          <th>-w<br />
1409          </th>
1410          <th style="background-color: #eeffee;">Input</th>
1411        </tr>
1412        <tr>
1413          <th><CODE>.cro</CODE><br />
1414          </th>
1415          <th style="background-color: #eeffee;">Input</th>
1416          <td align="center" colspan="1" rowspan="1" style="background-color: #eeffee;">Use as the module name.<br />
1417          </td>
1418          <td align="center" colspan="1" rowspan="1" style="background-color: #eeffee;">Use as the export type.</td>
1419        </tr>
1420      </tbody>
1421    </table>
1422    <h4>Contents of the <CODE>import</CODE> elements and the <CODE>export</CODE> elements (symbol names). <br />
1423    </h4>
1424    <table border="1">
1425      <tbody>
1426        <tr>
1427          <th rowspan="1" colspan="2">Feature \ Element </th>
1428          <th><CODE>import</CODE><br />
1429          </th>
1430          <th><CODE>export</CODE></th>
1431        </tr>
1432        <tr>
1433          <th>Create (-l)</th>
1434          <th style="background-color: #eeeeff;">Output</th>
1435          <td align="center" style="background-color: #eeeeff;">Export the undefined symbols of the ELF file.<br />
1436          </td>
1437          <td align="center" style="background-color: #eeeeff;">Export the defined symbols of the ELF file.<br />
1438          </td>
1439        </tr>
1440        <tr>
1441          <th rowspan="2" colspan="1">Merge (-m)</th>
1442          <th style="background-color: #eeffee;">Input</th>
1443          <td align="center" style="background-color: #eeeeee;">--</td>
1444          <td align="center" rowspan="2" colspan="1" style="background-color: #eeeeee;">--</td>
1445        </tr>
1446        <tr>
1447          <th style="background-color: #eeeeff;">Output</th>
1448          <td style="background-color: #eeeeff;">Do not export those contained in <CODE>export</CODE>.</td>
1449        </tr>
1450        <tr>
1451          <th colspan="1" rowspan="4">Merge Undefined (-c)</th>
1452          <th style="background-color: #ddffdd; white-space: nowrap;">Base</th>
1453          <td align="center" colspan="1" rowspan="1" style="background-color: #eeeeee;">--<br />
1454          </td>
1455          <td align="center" style="background-color: #ddffdd;">Use for correspondence with <CODE>import</CODE>. </td>
1456        </tr>
1457        <tr>
1458          <th style="background-color: #eeffee;">Input</th>
1459          <td align="center" style="background-color: #eeffee;">Use for correspondence with <CODE>export</CODE>. </td>
1460          <td align="center" colspan="1" rowspan="1" style="background-color: #eeffee;">Use for correspondence with <CODE>import</CODE>.</td>
1461        </tr>
1462        <tr>
1463          <th style="background-color: #eeeeff;">Output</th>
1464          <td align="center" style="background-color: #eeeeee;" colspan="1"
1465
1466            rowspan="2">--<br />
1467          </td>
1468          <td align="center" style="background-color: #eeeeee;" rowspan="1"
1469
1470            colspan="1">--<br />
1471          </td>
1472        </tr>
1473        <tr>
1474          <th style="background-color: #ddddff;">Added</th>
1475          <td align="center" colspan="1" rowspan="1" style="background-color: #ddddff;">Export undefined symbols.</td>
1476        </tr>
1477        <tr>
1478          <th colspan="1" rowspan="4">Resolve References (-f)</th>
1479          <th style="background-color: #ddffdd;">Base</th>
1480          <td align="center" style="background-color: #ddffdd;" colspan="1">Use for correspondence with <CODE>export</CODE>. </td>
1481          <td align="center" style="background-color: #ddffdd;" colspan="1">Use for correspondence with <CODE>import</CODE>. </td>
1482        </tr>
1483        <tr>
1484          <th style="background-color: #eeffee;">Input</th>
1485          <td align="center" style="background-color: #eeffee;" colspan="1">Use for correspondence with <CODE>export</CODE>.</td>
1486          <td align="center" style="background-color: #eeffee;" colspan="1">Use for correspondence with <CODE>import</CODE>.</td>
1487        </tr>
1488        <tr>
1489          <th style="background-color: #eeeeff;">Output</th>
1490          <td align="center" colspan="1" rowspan="1" style="background-color: #eeeeee;">--</td>
1491          <td align="center" rowspan="4" colspan="1" style="background-color: #eeeeee;">--<br />
1492          </td>
1493        </tr>
1494        <tr>
1495          <th style="background-color: #ddddff;">Added</th>
1496          <td rowspan="1" style="background-color: #ddddff;">Export multiply defined symbols.<br />
1497          </td>
1498        </tr>
1499        <tr>
1500          <th colspan="1" rowspan="2">Offsets (-p)</th>
1501          <th style="background-color: #eeffee;">Input</th>
1502          <td align="center" rowspan="4" colspan="1" style="background-color: #eeeeee;">--<br />
1503          </td>
1504        </tr>
1505        <tr>
1506          <th style="background-color: #eeeeff;">Output</th>
1507        </tr>
1508        <tr>
1509          <th>-s<br />
1510          </th>
1511          <th style="background-color: #eeffee;">Input</th>
1512          <td align="center" style="background-color: #eeffee;">Use for command.<br />
1513          </td>
1514        </tr>
1515        <tr>
1516          <th>-x<br />
1517          </th>
1518          <th style="background-color: #eeffee;">Input</th>
1519          <td align="center" style="background-color: #eeffee;">Use for command.</td>
1520        </tr>
1521        <tr>
1522          <th>-w<br />
1523          </th>
1524          <th style="background-color: #eeffee;">Input</th>
1525          <td align="center" colspan="1" rowspan="1" style="background-color: #eeffee;">Use for command.</td>
1526          <td align="center" style="background-color: #eeeeee;">--<br />
1527          </td>
1528        </tr>
1529        <tr>
1530          <th><CODE>.cro</CODE><br />
1531          </th>
1532          <th style="background-color: #eeffee;">Input</th>
1533          <td align="center" colspan="1" rowspan="1" style="background-color: #eeffee;">Use as a reference.<br />
1534          </td>
1535          <td align="center" style="background-color: #eeffee;">Use as the <CODE>export</CODE> element.<br />
1536          </td>
1537        </tr>
1538      </tbody>
1539    </table>
1540    <h2><a name="h2_make_cro">Create the <CODE>.cro</CODE> File</a></h2>
1541    <p>Before reading the procedure for creating <CODE>.cro</CODE> files, review the following description of the structure of <CODE>.cro</CODE> files.<br />
1542    </p>
1543    <h3>The CRO File Structure</h3>
1544    <p>The <CODE>.cro</CODE> file contains the following information. Values obtained from the <CODE>.xrl</CODE> files are denoted by <span class="info">[xrl]</span>. Other values are obtained from the ELF file.</p>
1545    <ul>
1546      <li><span class="info">[xrl]</span> Module name.</li>
1547      <li>Executable code.<br />
1548      </li>
1549      <li>Information for the symbols to export.</li>
1550      <ul>
1551        <li>Name and relocation information for symbols of export type <CODE>name</CODE>.</li>
1552        <li><span class="info">[xrl]</span> Relocation information for symbols of export type <CODE>index</CODE>.</li>
1553      </ul>
1554      <li>Information for the symbols to reference.</li>
1555      <ul>
1556        <li>Name for symbols of export type <CODE>name</CODE>.</li>
1557        <li><span class="info">[xrl]</span> Module name and index for symbols of export type <CODE>index</CODE>.</li>
1558        <li><span class="info">[xrl]</span> Module name, section number, and offset for symbols of export type <CODE>offset</CODE>.</li>
1559      </ul>
1560      <li>Internal relocation information.</li>
1561      <li>External relocation information.</li>
1562    </ul>
1563    <p>In particular, note the information for the symbols to export and the information for the symbols to reference. You must consider how to configure this particular information. Normally, you do not need to worry about the executable code and the relocation information.<br />
1564    </p>
1565    <p>The <CODE>.crs</CODE>  file structure is similar, but without the executable code or the internal relocation information.</p>
1566    <p>The <CODE>.cro</CODE> file is created from a shared object ELF file. Typically the only export type for shared object ELF files is <CODE>name</CODE>. To make up for this limitation, you create the <CODE>.cro</CODE> file by getting the additional information that you need for export types <CODE>index</CODE> and <CODE>offset</CODE> from the <CODE>.xrl</CODE> files. </p>
1567    <p>From a different perspective, you can consider the <CODE>.cro</CODE> file as a shared object ELF file, but with some or all of the symbol export types changed to <CODE>index</CODE> and <CODE>offset</CODE>.</p>
1568    <h3>Minimal Steps</h3>
1569    <p>If you have the appropriate <CODE>.xrl</CODE> files and the appropriate ELF file, you can create a <CODE>.cro</CODE> file by simply importing these files and performing the <a href="#make_cro">Create CRO</a> step. All other tasks through <a          href="#make_cro">Create CRO</a> in the SDK build system are performed to create the appropriate <CODE>.xrl</CODE> files and the appropriate ELF file.</p>
1570    <p>So the minimum build system performs the following steps.</p>
1571    <ol>
1572      <li>Use <code>NN_DLL_INPORT</code> and <code>NN_DLL_EXPORT</code> in the source code.</li>
1573      <li>Create a shared object ELF file.</li>
1574      <li>Create an <CODE>.xrl</CODE> file with the symbols that are referenced listed in <CODE>import</CODE> elements.</li>
1575      <li>Using the shared object ELF file and the <CODE>.xrl</CODE> file, perform the <a href="#make_cro">Create CRO</a> step.</li>
1576    </ol>
1577    <p>or</p>
1578    <ol>
1579      <li>Create a steering file and an <CODE>.xrl</CODE> file from the symbols to export and the symbols to reference.<br />
1580      </li>
1581      <li>Use the steering file of step 1 to create a shared object ELF file.</li>
1582      <li>Using the steering file and shared object ELF file, perform the <a href="#make_cro">Create CRO</a> step.</li>
1583    </ol>
1584    <p>This procedure can probably be used without trouble for small modules, but for large and complicated projects it is not realistic. The following section describes issues that arise when you construct a build system to create a <CODE>.cro</CODE> file. It also describes the support options in the SDK.<br />
1585    </p>
1586    <h2><a name="h2_task">Issues and Support</a></h2>
1587    <p>If you are going to construct your own mechanism to create the <CODE>.cro</CODE> file, you must consider how to handle a number of issues.<br />
1588    </p>
1589    <h3>Issues That Require Attention</h3>
1590    <p>You must deal with the following issues.<br />
1591    </p>
1592    <h4>Management of Export Symbols and Reference Symbols </h4>
1593    <p>You need a way to specify which symbols are for export, and which symbols are for reference. The easiest method is to use <code>NN_DLL_IMPORT</code> and <code>NN_DLL_EXPORT</code>, but these must be managed manually.<br />
1594    </p>
1595    <h4>Support for CRT Symbols and SDK Symbols</h4>
1596    <p>You cannot use <code>NN_DLL_IMPORT</code> and <code>NN_DLL_EXPORT</code> for CRT symbols and SDK symbols. Another procedure is required. Also, the steering file is insufficient for CRT symbols.<br />
1597    </p>
1598    <h4>Export Types Other Than <CODE>name</CODE></h4>
1599    <p>To use <CODE>index</CODE> and <CODE>offset</CODE> as export types, you must specify them in the <CODE>.xrl</CODE> file.
1600    </p>
1601    <h4>Support for <code>nnroUnresolved</code> in the Static Module</h4>
1602    <p>References to unresolved symbols from dynamic modules are replaced with references to <code>nnroUnresolved</code> when the modules are loaded. However, in the <CODE>.ro</CODE> format DLL mechanism, the static module is loaded in a detached state. This process of replacing references with <code>nnroUnresolved</code> does not occur.
1603    </p>
1604    <h4>Support for Symbols with Multiple Definitions</h4>
1605    <p>C++ allows for multiply defined symbols, and you must handle them.<br />
1606    </p>
1607    <h3>Support in the SDK</h3>
1608    <p>The SDK build system handles these issues in the following ways.</p>
1609    <h4>Management of Export Symbols and Reference Symbols </h4>
1610    <p>The reference relationships of the various symbols are determined, and a steering file is created for exporting and importing the necessary symbols.</p>
1611    <p>The general flow of the build system is as follows:<br />
1612    </p>
1613    <ol>
1614      <li>Perform partial linking. (<a href="#partial_link">Partial Linking</a>)</li>
1615      <li>List all defined or referenced symbols in the partially linked ELF file. (<a href="#listup">Create List of Symbols</a>)<br />
1616      </li>
1617      <li>Check symbols that are referenced among modules. (<a href="#resolve_reference">Resolve Symbol References</a>)</li>
1618      <li>Create a steering file to export symbols that are referenced and to import symbols that are referenced. (<a href="#make_stearing_file">Create Steering File</a>)</li>
1619      <li>Apply the linker command file at link time. (<a href="#link_dynamic_module">Link Dynamic Modules</a>)<br />
1620      </li>
1621    </ol>
1622    <h4>Support for CRT Symbols and SDK Symbols</h4>
1623    <p>The SDK symbols can be supported by using the previously described method to incorporate the static libraries when partially linking. However, because there are so many SDL libraries, acting to incorporate them all slow downs the process of partial linking and all subsequent steps. Moreover, this method does not support CRT symbols.</p>
1624    <p>For these reasons, a different method is employed. A process is performed to update the <CODE>.xrl</CODE> file so that undefined symbols are set for export by the static module. This method treats undefined symbols as either SDK or CRT symbols, and presumes that the SDK libraries and CRT symbols are defined in the static module. In addition, a command line option is specified for the linker so that these symbols are actually included in the static module.  </p>
1625    <p>The flow in the build system is as follows:</p>
1626    <ol>
1627      <li>Assume that symbols that are not defined in any module are defined by the static module. (<a href="#merge_undefined_symbol">Merge Undefined Symbols</a>)</li>
1628      <li>Create a command file for the linker so that symbols that are defined in the libraries are included in the static module. (<a href="#make_command_file">Create Command File</a>)</li>
1629      <li>Apply the previously mentioned linker command file at link time. (<a href="#link_static_module">Link Static Module</a>)</li>
1630    </ol>
1631    <h4>Export Types Other Than <CODE>name</CODE></h4>
1632    <p>Information about export types cannot be stored in the ELF file, so everything is done with <CODE>.xrl</CODE> files. To use export types other than <CODE>name</CODE>, the types must be specified in the <CODE>.xrl</CODE> file. In addition, the referencing <CODE>.xrl</CODE> file must store the same export type and related information as the exporting side. </p>
1633    <p>The flow in the build system is as follows:</p>
1634    <ol>
1635      <li>Specify the export type when listing symbols in the <CODE>.xrl</CODE> file. (<a href="#listup">Create List of Symbols</a>)</li>
1636      <li>Check and retain the export types of referenced symbols and the parameters for referencing. (<a href="#replace_reference">Resolve Symbol References</a>)</li>
1637      <li>Get and retain the offset values from the ELF file. (<a href="#resolved_offset">Resolve Offsets</a>)</li>
1638      <li>Store the appropriate information for each export type from the information consolidated in the <CODE>.xrl</CODE> files. (<a href="#make_crs">Create CRS File</a>, <a            href="#make_cro">Create CRO File</a>)<br />
1639      </li>
1640    </ol>
1641    <p>The SDK build system provides only a way to batch-specify export types when creating the list of symbols. By creating the <CODE>.xrl</CODE> files yourself, you can individually specify the export type for each symbol. </p>
1642    <h4>Support for <code>nnroUnresolved</code> in the Static Module</h4>
1643    <p>Undefined symbols might be referenced in the static module before any calls to the <CODE>.ro</CODE> library API. Handle this possibility by replacing references that are unresolved in the ELF file with references to <code>nnroUnresolved</code>. (<a          href="#replace_reference">Replace References</a>)</p>
1644    <h4>Support for Symbols with Multiple Definitions</h4>
1645    <p>The simple way to deal with multiply defined symbols is to select one definition and use that definition for all references. However, when a symbol is defined inside a module, the <CODE>ARMCC</CODE> linker references that symbol inside that module and ignores the steering file, even if the steering file specifies the importing of references from inside that module. To handle this, the <CODE>fromelf</CODE> tool, which is included in <CODE>ARMCC</CODE>, is used to force import. </p>
1646    <p>The flow in the build system is as follows:</p>
1647    <ol>
1648      <li>Treat multiply defined symbols as targets for forced import that are defined in the static module. (<a href="#resolve_reference">Resolve Symbol References</a>)</li>
1649      <li>Create a command file for <CODE>fromelf</CODE> to force the import of force-import targets. (<a href="#make_command_file2">Create Command File 2</a>)</li>
1650      <li>Force import. (<a href="#force_reference">Force References</a>)</li>
1651    </ol>
1652    <p>With the SDK build system, the actual definitions for multiply-defined symbols are held in the static module. But the definitions can be held in another module by using the process that corresponds to <a href="#resolve_reference">Resolve Symbol References</a> to change the module that performs the <a          href="#force_reference">Force References</a> step.<br />
1653    </p>
1654    <h3>Classification of the SDK Build Steps</h3>
1655    <p>The table shows each SDK build step and its purpose.</p>
1656    <table border="1">
1657      <tbody>
1658        <tr>
1659          <th>Build Step<br />
1660          </th>
1661          <th>Purpose<br />
1662          </th>
1663        </tr>
1664        <tr>
1665          <td><a href="#partial_link">Partial Linking<br /></a></td>
1666          <td>Management of export symbols and reference symbols.<br />
1667          </td>
1668        </tr>
1669        <tr>
1670          <td><a href="#listup">Create List of Symbols<br /></a></td>
1671          <td>Management of export symbols and reference symbols. </td>
1672        </tr>
1673        <tr>
1674          <td><a href="#merge_undefined_symbol">Merge Undefined Symbols<br /></a></td>
1675          <td>Support for CRT symbols and SDK symbols.<br />
1676          </td>
1677        </tr>
1678        <tr>
1679          <td><a href="#resolve_reference">Resolve Symbol References<br /></a></td>
1680          <td>Management of export symbols and reference symbols.<br />Use of export types other than <CODE>name</CODE>.<br />Support for symbols with multiple definitions. </td>
1681        </tr>
1682        <tr>
1683          <td><a href="#make_command_file">Create Command File<br /></a></td>
1684          <td>Support for CRT symbols and SDK symbols. </td>
1685        </tr>
1686        <tr>
1687          <td><a style="white-space: nowrap;" href="#make_stearing_file">Create Steering Files<br /></a></td>
1688          <td>Management of export symbols and reference symbols. </td>
1689        </tr>
1690        <tr>
1691          <td><a href="#link_dynamic_module">Link ELF</a><br />
1692          </td>
1693          <td>(This is required.)<br />
1694          </td>
1695        </tr>
1696        <tr>
1697          <td><a href="#replace_reference">Replace References</a><br />
1698          </td>
1699          <td>Support for <code>nnroUnresolved</code> in the static module.<br />
1700          </td>
1701        </tr>
1702        <tr>
1703          <td><a href="#make_command_file2">Create Command File 2</a><br />
1704          </td>
1705          <td>Support for symbols with multiple definitions.<br />
1706          </td>
1707        </tr>
1708        <tr>
1709          <td><a href="#force_reference">Force References</a><br />
1710          </td>
1711          <td>Support for symbols with multiple definitions. </td>
1712        </tr>
1713        <tr>
1714          <td><a href="#resolved_offset">Resolve Offsets</a><br />
1715          </td>
1716          <td>Use of export types other than <CODE>name</CODE>. </td>
1717        </tr>
1718        <tr>
1719          <td><a href="#make_cro">Create the <CODE>.cro</CODE> File</a><br />
1720          </td>
1721          <td>(This is required.)<br />
1722          </td>
1723        </tr>
1724      </tbody>
1725    </table>
1726    <h3>SDK Limitations</h3>
1727    <p>The SDK build system has a number of limitations to make it simple to use. The following table lists the main limitations of the SDK build system, and the specifications that are possible with <CODE>.ro</CODE>. The specifications that are possible with <CODE>.ro</CODE> are not supported in the SDK build system, so a number of actions must be taken to use them.<br />
1728    </p>
1729    <table border="1">
1730      <tbody>
1731        <tr>
1732          <th>Subject </th>
1733          <th>Limitations in SDK </th>
1734          <th>Possible Specifications<br />
1735          </th>
1736          <th>Issues that Must Be Addressed<br />
1737          </th>
1738        </tr>
1739        <tr>
1740          <td>Level at which export type is specified<br />
1741          </td>
1742          <td>Module level.<br />
1743          </td>
1744          <td>Symbol level.<br />
1745          </td>
1746          <td>
1747            <ul>
1748              <li>How to specify at the symbol level.</li>
1749            </ul>
1750          </td>
1751        </tr>
1752        <tr>
1753          <td colspan="1" rowspan="1">Modules that can hold CRT symbols<br />
1754          </td>
1755          <td colspan="1" rowspan="1">Static module.<br />
1756          </td>
1757          <td colspan="1" rowspan="1">Any module.<br />
1758          </td>
1759          <td>
1760            <ul>
1761              <li>Proper management of the load status of modules that reference symbols and modules that define symbols. </li>
1762              <li> How to specify modules that hold definitions.</li>
1763            </ul>
1764          </td>
1765        </tr>
1766        <tr>
1767          <td colspan="1" rowspan="1">Build level<br />
1768          </td>
1769          <td colspan="1" rowspan="1">All modules at once.<br />
1770          </td>
1771          <td colspan="1" rowspan="1">Each module.<br />
1772          </td>
1773          <td>
1774            <ul>
1775              <li>Cannot automatically determine referencing and exporting.</li>
1776              <li> Modules built later cannot use <CODE>offset</CODE> as the export type. </li>
1777            </ul>
1778          </td>
1779        </tr>
1780        <tr>
1781          <td colspan="1" rowspan="1">Use of the module<br />
1782          </td>
1783          <td colspan="1" rowspan="1">Requires an environment for builds that include the source.<br />
1784          </td>
1785          <td colspan="1" rowspan="1">All that is required is the header, <CODE>.xrl</CODE>, and <CODE>.cro</CODE> files.<br />
1786          </td>
1787          <td>
1788            <ul>
1789              <li>Cannot automatically determine referencing and exporting.</li>
1790              <li>Modules built later cannot use <CODE>offset</CODE> as the export type.  </li>
1791            </ul>
1792          </td>
1793        </tr>
1794        <tr>
1795          <td colspan="1" rowspan="1">Definitions for multiply-defined symbols<br />
1796          </td>
1797          <td colspan="1" rowspan="1">Static module.<br />
1798          </td>
1799          <td colspan="1" rowspan="1">Any module.<br />
1800          </td>
1801          <td>
1802            <ul>
1803              <li>Proper management of the load status of modules that reference symbols and modules that define symbols. </li>
1804              <li> How to specify modules that hold definitions.</li>
1805            </ul>
1806          </td>
1807        </tr>
1808      </tbody>
1809    </table>
1810    <h2><a name="h2_hint">Strategies and Tips</a></h2>
1811    <h3>Steps</h3>
1812    <p>As mentioned in <a href="#make_cro">Create the <CODE>.cro</CODE> File</a>, the symbols to reference and the symbols to export in the <CODE>.cro</CODE> file are determined by the contents of the ELF file. Your responsibility is to consider how to create an ELF file that meets the objective.</p>
1813    <p>The created ELF file is adjusted by using  <code>NN_DLL_EXPORT</code> and <code>NN_DLL_IMPORT</code>, or by using a steering file, but you must still handle special issues such as CRT symbols. You can automate part of these processes by using <CODE>.xrl</CODE> files and <CODE>makecro</CODE>. Consider how to create the <CODE>.xrl</CODE> files to achieve the intended results for this part. </p>
1814    <p>When you create your build system, think about how you can use <CODE>.xrl</CODE> files, the <CODE>fromelf</CODE> tool, and other methods to create an ELF file that realizes your objective.</p>
1815    <p> </p>
1816    <h3>Library DLL</h3>
1817    <p><CODE>.ro</CODE> can also be used as a library.</p>
1818    <p>As a library, .ro can perform the following tasks.</p>
1819    <ul>
1820      <li>Begin creation of the static module after completing creation of the dynamic modules.</li>
1821      <li>Use a single dynamic module in multiple applications.</li>
1822      <li>Use dynamic modules without using the dynamic module source code.</li>
1823    </ul>
1824    <p> </p>
1825    <h4>Requirements</h4>
1826    <p>To use these tasks, you must satisfy the following conditions.</p>
1827    <ul>
1828      <li>Symbols that are referenced from the library dynamic module (such as symbols in the static module) must be of export type <CODE>name</CODE>.<br /> (This requirement is because index and offset values cannot be known ahead of time. The library dynamic modules can use export symbols of any export type.)</li>
1829      <li>The library dynamic modules must manually select which symbols to export. <br /> (This selection cannot be automated because the module that is referencing the symbols does not know what it is referencing.)</li>
1830    </ul>
1831    <p> These tasks can be performed manually, or you can create a tool for automating the tasks and create the appropriate <CODE>.xrl</CODE> files to create the library dynamic modules.    </p>
1832    <h4>Flow<br />
1833    </h4>
1834    <p>The general process flow is as follows:</p>
1835    <ol>
1836      <li>Determine which symbols to export.</li>
1837      <li>Perform the <a href="#listup">Create List of Symbols</a> step.</li>
1838      <li>Delete symbols which are not exported from the <CODE>.xrl</CODE> file created in the previous step. </li>
1839      <li>Perform the <a href="#make_stearing_file">Create Steering File</a> step.</li>
1840      <li>Perform the <a href="#link_dynamic_module">Link Dynamic Modules</a> step.</li>
1841      <li>If necessary, perform the <a href="#resolved_offset">Resolve Offsets</a> step.<br />
1842      </li>
1843      <li>Perform the <a href="#make_cro">Create the <CODE>.cro</CODE> File</a> step.</li>
1844    </ol>
1845    <p>The following procedure is the general procedure for using a library dynamic module.</p>
1846    <ol>
1847      <li>Prepare header, <CODE>.xrl</CODE>, <CODE>.cro</CODE> and <CODE>.rlt</CODE> files for the library dynamic module.</li>
1848      <li>Using the library dynamic module header, perform the <a href="#partial_link">Partial Linking</a> step on the modules that use the library dynamic module.</li>
1849      <li>Perform the <a href="#listup">Create List of Symbols</a> and <a href="#merge_undefined_symbol">Merge Undefined Symbols</a> steps on the modules that use the library dynamic module.</li>
1850      <li>Perform the <a href="#resolve_reference">Resolve Symbol References</a> step on the modules that use the library dynamic module, including in that step the <CODE>.xrl</CODE> file of the library dynamic module.<br /> However, do not resolve symbol references for the <CODE>.xrl</CODE> file of the library dynamic module.</li>
1851      <li>All subsequent steps are the same as usual.</li>
1852      <li>If necessary, use the <CODE>.xrl</CODE> file of the library dynamic module when performing the <a href="#make_cro">Create the <CODE>.cro</CODE> File</a> step on the modules that use the library dynamic module.</li>
1853      <li>Perform the <a href="#make_crr">Create the <CODE>.crr</CODE> File</a> step, including the <CODE>.rlt</CODE> file of the library dynamic module.</li>
1854    </ol>
1855    <h2><a name="h2_make_crr">Create the <CODE>.crr</CODE> File</a></h2>
1856    <p>The procedure for creating the <CODE>.crr</CODE> file is separated from <CODE>.cro</CODE> and has no flexibility. The procedure is very similar to the procedure of the SDK build system.<br />
1857    </p>
1858    <h3>Relationship Between <CODE>.crr</CODE> and <CODE>.cro</CODE></h3>
1859    <p>The <CODE>.crr</CODE> file is created with the <CODE>makecrr</CODE> tool by using the <CODE>.rlt</CODE> file, which is created at the same time as the <CODE>.cro</CODE> file. The <CODE>.crr</CODE> is made from the <CODE>.rlt</CODE> file that was generated when <CODE>.cro</CODE> was created. The <CODE>.cro</CODE> file cannot be loaded at execution time if the <CODE>.crr</CODE> file is not loaded first. </p>
1860    <p>A number of <CODE>.rlt</CODE> files can be combined to create a single <CODE>.crr</CODE> file. Normally, it is fine to have just one <CODE>.crr</CODE> file, as long as it is made from all of the combined <CODE>.rlt</CODE> files.</p>
1861    <h3>Using Multiple <CODE>.crr</CODE> Files</h3>
1862    <p>The flexibility when creating <CODE>.crr</CODE> files depends on the correspondence between <CODE>.rlt</CODE> and <CODE>.crr</CODE>. As mentioned previously, it is normally fine to create just one <CODE>.crr</CODE> file by combining all of the <CODE>.rlt</CODE> files.</p>
1863    <p>You can also create <CODE>.crr</CODE> files in a one-to-one relationship with <CODE>.cro</CODE> files, but this is not recommended because when you have many <CODE>.crr</CODE> files, it affects performance when loading <CODE>.cro</CODE>.<br />
1864    </p>
1865    <p>When sending <CODE>.cro</CODE> and <CODE>.crr</CODE> files to Download Play child devices when the parent device uses a different <CODE>.cro</CODE> file than the child devices, you can create one <CODE>.crr</CODE> file for the parent and a separate <CODE>.crr</CODE> file for the child devices, and send only the <CODE>.crr</CODE> file for the children from the parent to the children. Of course, in such cases the <CODE>.crr</CODE> file for the child devices is already included in the child ROM-FS.</p>
1866    <h2>Revision History</h2>
1867    <dl class="history">
1868      <dt>2012/06/22</dt>
1869      <dd> Initial version. </dd>
1870    </dl>
1871    <div class="footer"><span>Build System Development Guide (for High-Level DLLs)</span></div>
1872  <hr><p>CTR-06-0208-002-B<br>CONFIDENTIAL</p></body>
1873</HTML>