Add support for WinCE based toolchains.
[deliverable/binutils-gdb.git] / ld / ld.texinfo
index 382dd7e4865cdd9faeb254f95e57d6c1f0c055fe..8ecdef2ba04daefa1fa45ca3d9a0d7f49e463f7f 100644 (file)
@@ -228,6 +228,21 @@ requires them.  For example, @samp{--oformat srec} and
 @samp{--oformat=srec} are equivalent.  Unique abbreviations of the names
 of multiple-letter options are accepted.
 
+Note - if the linker is being invoked indirectly, via a compiler driver
+(eg @samp{gcc}) then all the linker command line options should be
+prefixed by @samp{-Wl,} (or whatever is appropriate for the particular
+compiler driver) like this:
+
+@smallexample
+  gcc -Wl,--startgroup foo.o bar.o -Wl,--endgroup
+@end smallexample
+
+This is important, because otherwise the compiler driver program may
+silently drop the linker options, resulting in a bad link.
+
+Here is a table of the generic command line switches accepted by the GNU
+linker:
+
 @table @code
 @kindex -a@var{keyword}
 @item -a@var{keyword}
@@ -544,8 +559,8 @@ which caused the archive member to be brought in.
 @kindex --nmagic
 @item -n
 @itemx --nmagic
-Set the text segment to be read only, and mark the output as
-@code{NMAGIC} if possible.
+Turn off page alignment of sections, and mark the output as
+@code{NMAGIC} if possible. 
 
 @kindex -N
 @kindex --omagic
@@ -2112,7 +2127,7 @@ The full description of an output section looks like this:
     @var{output-section-command}
     @var{output-section-command}
     @dots{}
-  @} [>@var{region}] [:@var{phdr} :@var{phdr} @dots{}] [=@var{fillexp}]
+  @} [>@var{region}] [AT>@var{lma_region}] [:@var{phdr} :@var{phdr} @dots{}] [=@var{fillexp}]
 @end group
 @end smallexample
 
@@ -2617,7 +2632,7 @@ like this:
     @var{output-section-command}
     @var{output-section-command}
     @dots{}
-  @} [>@var{region}] [:@var{phdr} :@var{phdr} @dots{}] [=@var{fillexp}]
+  @} [>@var{region}] [AT>@var{lma_region}] [:@var{phdr} :@var{phdr} @dots{}] [=@var{fillexp}]
 @end group
 @end smallexample
 We've already described @var{section}, @var{address}, and
@@ -2671,6 +2686,7 @@ SECTIONS @{
 
 @node Output Section LMA
 @subsubsection Output section LMA
+@kindex AT>@var{lma_region}
 @kindex AT(@var{lma})
 @cindex load address
 @cindex section load address
@@ -2681,7 +2697,9 @@ 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.
+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}.
 
 @cindex ROM initialized data
 @cindex initialized data in ROM
This page took 0.024945 seconds and 4 git commands to generate.