BSS in ELF

Tony Bryant brd@paradise.net.nz
Wed Jun 13 22:52:00 GMT 2001


Ever since I switched to ELF from COFF, gcc is try to putting actual data in
my
BSS block.

I mean it's assuming that my unitialised globals should actually be
initialiased
with zeros.

Which really buggers up my objcopy to binary format, 71Meg binarys on a
target with 16K of ROM... hmmm...

I can get around it by specifically removing the ".BSS" section when
objcopying
the binary from the executable, but its a nasty hack. And BTW the (NOLOAD)
flag in the linker script doesn't help. Objcopy doesn't look at the NOLOAD
flag.

Why would GCC assume that my unitialised variables need to be initialised?
And is there a way to stop it?

Didn't used to happen with COFF.

Grumble.



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com



More information about the crossgcc mailing list