aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-02-15 03:34:47 +0000
committerAlan Modra <amodra@gmail.com>2002-02-15 03:34:47 +0000
commita139d329de2b3ba35b8929e60ed853cbf86072c0 (patch)
tree565fe6326aa5373d5b6b4b5516f270d6ba62eb90 /ld
parent2c382fb6f5499e01ce83c221f4b35f39e5b414f0 (diff)
downloadgdb-a139d329de2b3ba35b8929e60ed853cbf86072c0.zip
gdb-a139d329de2b3ba35b8929e60ed853cbf86072c0.tar.gz
gdb-a139d329de2b3ba35b8929e60ed853cbf86072c0.tar.bz2
* ld.texinfo (Output Section Fill): Describe fill expressions.
(FILL): Refer to the above.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog4
-rw-r--r--ld/ld.texinfo15
2 files changed, 14 insertions, 5 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index faafddc..27b95c4 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,6 +1,8 @@
2002-02-15 Alan Modra <amodra@bigpond.net.au>
Support arbitrary length fill patterns.
+ * ld.texinfo (Output Section Fill): Describe fill expressions.
+ (FILL): Refer to the above.
* ldexp.h (etree_value_type): Add "str" field.
(union etree_union): Add "str" to "value" struct.
(exp_bigintop): Declare.
@@ -59,7 +61,7 @@
2002-02-14 Phil Edwards <pme@gcc.gnu.org>
- * ld.texinfo (VERSION scripts): Symbol names are globbing patterns.
+ * ld.texinfo (VERSION scripts): Symbol names are globbing patterns.
* ldgram.y (lang_new_vers_regex): Rename to lang_new_vers_pattern;
the pattern in question is not a regexp.
* ldlang.c: Likewise.
diff --git a/ld/ld.texinfo b/ld/ld.texinfo
index 6665b3f..4addc3f 100644
--- a/ld/ld.texinfo
+++ b/ld/ld.texinfo
@@ -2930,7 +2930,7 @@ You may use the @code{FILL} command to set the fill pattern for the
current section. It is followed by an expression in parentheses. Any
otherwise unspecified regions of memory within the section (for example,
gaps left due to the required alignment of input sections) are filled
-with the four least significant bytes of the expression, repeated as
+with the value of the expression, repeated as
necessary. A @code{FILL} statement covers memory locations after the
point at which it occurs in the section definition; by including more
than one @code{FILL} statement, you can have different fill patterns in
@@ -2946,7 +2946,8 @@ The @code{FILL} command is similar to the @samp{=@var{fillexp}} output
section attribute (@pxref{Output Section Fill}), but it only affects the
part of the section following the @code{FILL} command, rather than the
entire section. If both are used, the @code{FILL} command takes
-precedence.
+precedence. See (@pxref{Output Section Fill}) for details on the fill
+expression.
@node Output Section Keywords
@subsection Output section keywords
@@ -3225,8 +3226,14 @@ You can set the fill pattern for an entire section by using
@samp{=@var{fillexp}}. @var{fillexp} is an expression
(@pxref{Expressions}). Any otherwise unspecified regions of memory
within the output section (for example, gaps left due to the required
-alignment of input sections) will be filled with the four least
-significant bytes of the value, repeated as necessary.
+alignment of input sections) will be filled with the value, repeated as
+necessary. If the fill expression is a simple hex number, ie. a string
+of hex digit starting with "0x" and without a trailing "k" or "M", then
+an arbitrarily long sequence of hex digits can be used to specify the
+fill pattern; Leading zeros become part of the pattern too. For all
+other cases, including extra parentheses or a unary '+', the fill
+pattern is the four least significant bytes of the value of the
+expression. In all cases, the number is big-endian.
You can also change the fill value with a @code{FILL} command in the
output section commands; see @ref{Output Section Data}.