GNU Info

Info Node: (ld.info)Output Section Fill

(ld.info)Output Section Fill


Prev: Output Section Phdr Up: Output Section Attributes
Enter node , (file) or (file)node

Output section fill
...................

   You can set the fill pattern for an entire section by using
`=FILLEXP'.  FILLEXP is an expression (Note: 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 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 `FILL' command in the
output section commands; (Note: Output Section Data).

   Here is a simple example:
     SECTIONS { .text : { *(.text) } =0x90909090 }


automatically generated by info2www version 1.2.2.9