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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

5.4 Combining Sections<br />

5.4 Combining Sections<br />

For a linker, we often write "combining multiple objects" but more accurately we should<br />

write "combining sections in objects".<br />

A section may be combined through a simple connection combination (PUBLIC) and<br />

shared combination (COMMON).<br />

■ Simple Connection Combination of Sections<br />

The REL sections with the same section name and contents type and the combination attribute of PUBLIC<br />

are connected through simple connection combination.<br />

Figure 5.4-1 is an overview of the simple connection combination of the same sections in two object files.<br />

The entire size after combination is the total of the A-1 and A-2 sizes plus the gap size between A-1 and<br />

A-2 generated due to boundary adjustment.<br />

Figure 5.4-1 Simple Connection Combination of Sections<br />

Section A-1<br />

Section A-1<br />

Section A-2<br />

Section A-2<br />

■ Shared Combination of Sections<br />

The REL sections with the same section name and contents type and the combination attribute of<br />

COMMON are connected through shared combination.<br />

Use this function, for example, for a data section without initial values.<br />

Figure 5.4-2 is an overview of shared combination of the same sections in two object files.<br />

The entire size after combination is the larger one of the A-1 and A-2 sizes.<br />

Figure 5.4-2 Shared Combination of Sections<br />

Section A-1<br />

Section A-2<br />

A-1<br />

Section A-2<br />

PART II LINKER 61

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

Saved successfully!

Ooh no, something went wrong!