1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<html>
3<!-- This file documents the GNU linker LD
4(GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29))
5version 2.36.1.
6
7Copyright (C) 1991-2021 Free Software Foundation, Inc.
8
9Permission is granted to copy, distribute and/or modify this document
10under the terms of the GNU Free Documentation License, Version 1.3
11or any later version published by the Free Software Foundation;
12with no Invariant Sections, with no Front-Cover Texts, and with no
13Back-Cover Texts.  A copy of the license is included in the
14section entitled "GNU Free Documentation License". -->
15<!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ -->
16<head>
17<title>LD: Output Section Description</title>
18
19<meta name="description" content="LD: Output Section Description">
20<meta name="keywords" content="LD: Output Section Description">
21<meta name="resource-type" content="document">
22<meta name="distribution" content="global">
23<meta name="Generator" content="makeinfo">
24<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
25<link href="index.html#Top" rel="start" title="Top">
26<link href="LD-Index.html#LD-Index" rel="index" title="LD Index">
27<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
28<link href="SECTIONS.html#SECTIONS" rel="up" title="SECTIONS">
29<link href="Output-Section-Name.html#Output-Section-Name" rel="next" title="Output Section Name">
30<link href="SECTIONS.html#SECTIONS" rel="previous" title="SECTIONS">
31<style type="text/css">
32<!--
33a.summary-letter {text-decoration: none}
34blockquote.smallquotation {font-size: smaller}
35div.display {margin-left: 3.2em}
36div.example {margin-left: 3.2em}
37div.indentedblock {margin-left: 3.2em}
38div.lisp {margin-left: 3.2em}
39div.smalldisplay {margin-left: 3.2em}
40div.smallexample {margin-left: 3.2em}
41div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
42div.smalllisp {margin-left: 3.2em}
43kbd {font-style:oblique}
44pre.display {font-family: inherit}
45pre.format {font-family: inherit}
46pre.menu-comment {font-family: serif}
47pre.menu-preformatted {font-family: serif}
48pre.smalldisplay {font-family: inherit; font-size: smaller}
49pre.smallexample {font-size: smaller}
50pre.smallformat {font-family: inherit; font-size: smaller}
51pre.smalllisp {font-size: smaller}
52span.nocodebreak {white-space:nowrap}
53span.nolinebreak {white-space:nowrap}
54span.roman {font-family:serif; font-weight:normal}
55span.sansserif {font-family:sans-serif; font-weight:normal}
56ul.no-bullet {list-style: none}
57-->
58</style>
59
60
61</head>
62
63<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
64<a name="Output-Section-Description"></a>
65<div class="header">
66<p>
67Next: <a href="Output-Section-Name.html#Output-Section-Name" accesskey="n" rel="next">Output Section Name</a>, Up: <a href="SECTIONS.html#SECTIONS" accesskey="u" rel="up">SECTIONS</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="LD-Index.html#LD-Index" title="Index" rel="index">Index</a>]</p>
68</div>
69<hr>
70<a name="Output-Section-Description-1"></a>
71<h4 class="subsection">3.6.1 Output Section Description</h4>
72<p>The full description of an output section looks like this:
73</p><div class="smallexample">
74<pre class="smallexample"><var>section</var> [<var>address</var>] [(<var>type</var>)] :
75  [AT(<var>lma</var>)]
76  [ALIGN(<var>section_align</var>) | ALIGN_WITH_INPUT]
77  [SUBALIGN(<var>subsection_align</var>)]
78  [<var>constraint</var>]
79  {
80    <var>output-section-command</var>
81    <var>output-section-command</var>
82    &hellip;
83  } [&gt;<var>region</var>] [AT&gt;<var>lma_region</var>] [:<var>phdr</var> :<var>phdr</var> &hellip;] [=<var>fillexp</var>] [,]
84</pre></div>
85
86<p>Most output sections do not use most of the optional section attributes.
87</p>
88<p>The whitespace around <var>section</var> is required, so that the section
89name is unambiguous.  The colon and the curly braces are also required.
90The comma at the end may be required if a <var>fillexp</var> is used and
91the next <var>sections-command</var> looks like a continuation of the expression.
92The line breaks and other white space are optional.
93</p>
94<p>Each <var>output-section-command</var> may be one of the following:
95</p>
96<ul>
97<li> a symbol assignment (see <a href="Assignments.html#Assignments">Assignments</a>)
98</li><li> an input section description (see <a href="Input-Section.html#Input-Section">Input Section</a>)
99</li><li> data values to include directly (see <a href="Output-Section-Data.html#Output-Section-Data">Output Section Data</a>)
100</li><li> a special output section keyword (see <a href="Output-Section-Keywords.html#Output-Section-Keywords">Output Section Keywords</a>)
101</li></ul>
102
103
104
105
106</body>
107</html>
108