bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A possible bug / user error


From: Ian Lance Taylor
Subject: Re: A possible bug / user error
Date: 12 Mar 2004 21:25:28 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

"Adrian B. Weissman" <address@hidden> writes:

>      I am using objcopy to take an elf32-power pc file
> and convert it to a binary file.  My problem is that
> the bss section is not being included in my binary
> image.

This is normal.  Sections which have no contents, like the .bss
section, are not copied into a binary image by objcopy.  This is what
most people prefer, as the contents are just zeroes, so there is
little reason to copy them around, send them over serial lines, etc.
The program typically arranges to clear those parts of memory in the
startup code.

You can use a linker script to force the bss sections in the input
file into an allocated section in the output file.  Or you could try
the gcc option -fno-zero-initialized-in-bss.

Ian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]