summaryrefslogtreecommitdiff
path: root/ld/ld.texinfo
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2006-08-22 07:41:05 +0000
committerAlan Modra <amodra@bigpond.net.au>2006-08-22 07:41:05 +0000
commita3b0f0c7889c8e1c11b68a0f3a8f2bc3d4a54811 (patch)
tree8da54e8211c2ea481248d22d8284c859c35b3686 /ld/ld.texinfo
parent464fe482ba15630ffa2d4a30e93b932429514754 (diff)
downloadbinutils-redhat-a3b0f0c7889c8e1c11b68a0f3a8f2bc3d4a54811.tar.gz
* NEWS: Mention LMA default change.
* ld.texinfo (Output Section LMA): Update default description. (Location Counter): Clarify backward movement. * ldlang.c (lang_size_sections_1): Leave non-alloc sections with default lma equal to vma. Warn on backward movement of dot.
Diffstat (limited to 'ld/ld.texinfo')
-rw-r--r--ld/ld.texinfo17
1 files changed, 12 insertions, 5 deletions
diff --git a/ld/ld.texinfo b/ld/ld.texinfo
index 835482d1c2..ea21283483 100644
--- a/ld/ld.texinfo
+++ b/ld/ld.texinfo
@@ -3764,15 +3764,20 @@ Every section has a virtual address (VMA) and a load address (LMA); see
an output section description sets the VMA (@pxref{Output Section
Address}).
-The linker will normally set the LMA equal to the VMA. You can change
-that by using the @code{AT} keyword. The expression @var{lma} that
-follows the @code{AT} keyword specifies the load address of the
-section.
+The expression @var{lma} that follows the @code{AT} keyword specifies
+the load address of the section.
Alternatively, with @samp{AT>@var{lma_region}} expression, you may
specify a memory region for the section's load address. @xref{MEMORY}.
Note that if the section has not had a VMA assigned to it then the
linker will use the @var{lma_region} as the VMA region as well.
+
+If neither @code{AT} nor @code{AT>} is specified for an allocatable
+section, the linker will set the LMA such that the difference between
+VMA and LMA for the section is the same as the preceding output
+section in the same region. If there is no preceding output section
+or the section is not allocatable, the linker will set the LMA equal
+to the VMA.
@xref{Output Section Region}.
@cindex ROM initialized data
@@ -4586,7 +4591,9 @@ anywhere that an ordinary symbol is allowed in an expression.
@cindex holes
Assigning a value to @code{.} will cause the location counter to be
moved. This may be used to create holes in the output section. The
-location counter may never be moved backwards.
+location counter may not be moved backwards inside an output section,
+and may not be moved backwards outside of an output section if so
+doing creates areas with overlapping LMAs.
@smallexample
SECTIONS