31.12.2013 Views

Linkage Kit Manual V6-00 - Fujitsu

Linkage Kit Manual V6-00 - Fujitsu

Linkage Kit Manual V6-00 - Fujitsu

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 6 LINKER OPTIONS<br />

6.2.25 Automatic Allocation Specification (-AL)<br />

Automatic allocation of sections is specified.<br />

■ Automatic Allocation Specification (-AL)<br />

[Format]<br />

-AL { 0 | 1 | 2 }<br />

[Parameters]<br />

<br />

No automatic allocation (default)<br />

<br />

If an absolute section exists in the area, the order of allocation is changed appropriately to avoid<br />

overlapping with the section.<br />

<br />

Whether to allocate to the ROM area or RAM area is determined based on the section attributes. Then<br />

allocation is carried out to free space of each area.<br />

[Descriptions]<br />

Automatic allocation of sections is specified.<br />

• If the parameter is 1<br />

If an absolute section exists when allocating sections to the areas specified by the -ra or -ro option,<br />

relocatable sections are allocated in such a way that allocation addresses do not overlap. In such cases,<br />

sections are allocated in descending order of the alignment value and size starting with the section of the<br />

largest alignment value and size. In this way, optimal allocation is implemented where free space is<br />

minimum.<br />

• If the parameter is 2<br />

Whether to allocate sections whose allocation is not specified by the -sc option to the ROM area or<br />

RAM area is determined based on the section attributes. Then such sections are allocated to free space<br />

of each area.<br />

See also Section "5.6 Automatically Locating Sections".<br />

[Example]<br />

flnk911s -AL 1 -ro ROM=0x1<strong>00</strong>0/0x1FFF<br />

-sc code1+code2+code3=ROM...<br />

Each section is given as follows.<br />

• code1 : relocatable, size=0x18<br />

• code2 : relocatable, size =0x10<br />

• code3 : relocatable, size =0x30<br />

• AbsSec : absolute, address range=0x1010 to 0x1017<br />

Figure 6.2-8 shows the link map for this case.<br />

126 PART II LINKER

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!