aboutsummaryrefslogtreecommitdiff
path: root/ld/ld.texinfo
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2014-04-04 09:28:23 -0700
committerCary Coutant <ccoutant@google.com>2014-04-04 09:28:51 -0700
commitabc9061b5c4d684da66945a9928d54a424cb6e4e (patch)
treed4b8996a86ed8d74061bc74df40ae51900bda560 /ld/ld.texinfo
parent2cf200a4c8a850e6f696e572ea03f340eae97c8a (diff)
downloadgdb-abc9061b5c4d684da66945a9928d54a424cb6e4e.zip
gdb-abc9061b5c4d684da66945a9928d54a424cb6e4e.tar.gz
gdb-abc9061b5c4d684da66945a9928d54a424cb6e4e.tar.bz2
Document optional comma in linker script.
The linker script documentation does not mention the optional comma that may follow an output section command or an overlay command. In some cases, where a fill expression is used, and the next output section command begins with an operator (e.g., "/DISCARD/"), the comma may be required to separate the two commands. Currently, GNU ld doesn't require the comma, but gold does. ld/ PR gold/16804 * ld.texinfo: Document optional comma following output section command and overlay command.
Diffstat (limited to 'ld/ld.texinfo')
-rw-r--r--ld/ld.texinfo9
1 files changed, 7 insertions, 2 deletions
diff --git a/ld/ld.texinfo b/ld/ld.texinfo
index 8a41ee8..62d8aa7 100644
--- a/ld/ld.texinfo
+++ b/ld/ld.texinfo
@@ -3788,7 +3788,7 @@ The full description of an output section looks like this:
@var{output-section-command}
@var{output-section-command}
@dots{}
- @} [>@var{region}] [AT>@var{lma_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
@@ -3796,6 +3796,8 @@ Most output sections do not use most of the optional section attributes.
The whitespace around @var{section} is required, so that the section
name is unambiguous. The colon and the curly braces are also required.
+The comma at the end may be required if a @var{fillexp} is used and
+the next @var{sections-command} looks like a continuation of the expression.
The line breaks and other white space are optional.
Each @var{output-section-command} may be one of the following:
@@ -4729,7 +4731,7 @@ OVERLAY [@var{start}] : [NOCROSSREFS] [AT ( @var{ldaddr} )]
@dots{}
@} [:@var{phdr}@dots{}] [=@var{fill}]
@dots{}
- @} [>@var{region}] [:@var{phdr}@dots{}] [=@var{fill}]
+ @} [>@var{region}] [:@var{phdr}@dots{}] [=@var{fill}] [,]
@end group
@end smallexample
@@ -4740,6 +4742,9 @@ those within the general @code{SECTIONS} construct (@pxref{SECTIONS}),
except that no addresses and no memory regions may be defined for
sections within an @code{OVERLAY}.
+The comma at the end may be required if a @var{fill} is used and
+the next @var{sections-command} looks like a continuation of the expression.
+
The sections are all defined with the same starting address. The load
addresses of the sections are arranged such that they are consecutive in
memory starting at the load address used for the @code{OVERLAY} as a