Using FILL(n) or =FILLEXP in linker scripts
Mike Frysinger
vapier@gentoo.org
Mon Aug 13 21:38:00 GMT 2007
On Friday 10 August 2007, Alan Modra wrote:
> On Thu, Aug 09, 2007 at 02:19:01PM -0400, Ti Strga wrote:
> > .internal_chunk_two : {
> > FILL(0xDEADBEEF) /* attempt one */
> > __chunk_two_bottom = .;
> > . = . + _CHUNK_TWO_SIZE;
> > . = ALIGN(16);
> > __chunk_two_top = .;
> > } > ram =0xDEADBEEF /* attempt two */
> >
> > Neither FILL nor FILLEXP work here.
> >
> > Our questions:
> > (1) What are we doing wrong with the fill expression?
>
> The reason the fill isn't working is that ld treats this section like
> a bss section. It doesn't have any input sections containing data,
> nor does it have any data statements. You could argure that a
> non-zero fill ought to force a normal section, ie. you've struck a ld
> bug.
could you also argue that an explicit 0 fill should force a normal section ?
in other words, you want a .bss like section to be zero filled both on disk
as well as in memory at runtime ...
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 827 bytes
Desc: This is a digitally signed message part.
URL: <https://sourceware.org/pipermail/binutils/attachments/20070813/a7b170fc/attachment.sig>
More information about the Binutils
mailing list