13.11.2014 Views

GNUPro® Toolkit GNUPro Development Tools

GNUPro® Toolkit GNUPro Development Tools

GNUPro® Toolkit GNUPro Development Tools

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

}<br />

SECTIONS Command<br />

In the previousexample, if the program defines _etext, the linker will give a multiple<br />

definition error. If, on the other hand, the program defines etext, the linker will<br />

silently use the definition in the program. If the program references etext but does not<br />

define it, the linker will use the definition in the linker script.<br />

SECTIONS Command<br />

The SECTIONS command tells the linker how to map input sections into output<br />

sections, and how to place the output sections in memory. The following<br />

documentation describes more of the SECTIONS command.<br />

■ “Output Section Description” on page 38<br />

■ “Output Section Name” on page 38<br />

■ “Output Section Address” on page 39<br />

■ “Input Section Description” on page 39<br />

■ “Input Section Basics” on page 39<br />

■ “Input Section Wildcard Patterns” on page 40<br />

■ “Input Section for Common Symbols” on page 41<br />

■ “Input Section and Garbage Collection” on page 42<br />

■ “Input Section Example” on page 42<br />

■ “Output Section Data” on page 42<br />

■ “Output Section Keywords” on page 43<br />

■ “Output Section Discarding” on page 44<br />

■ “Output Section Attributes” on page 45<br />

■ “Output Section Type” on page 45<br />

■ “Output Section LMA” on page 45<br />

■ “Output Section Region” on page 46<br />

■ “Output Section to Programs Previously Defined” on page 46<br />

■ “Output Section Fill” on page 47<br />

■ “Overlay Description” on page 47<br />

The format of the SECTIONS command is:<br />

SECTIONS<br />

{<br />

sections-command<br />

sections-command<br />

...<br />

}<br />

Red Hat <strong>GNUPro</strong> <strong>Toolkit</strong> Using ld / <strong>GNUPro</strong> <strong>Development</strong> <strong>Tools</strong> ■ 37

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

Saved successfully!

Ooh no, something went wrong!