This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: faq regarding



On Fri, 15 Sep 2000, Michael Sokolov wrote:

> 
> No, you don't really have to fix up anything at run time. You can just do
> nothing and it will work, except that the initial contents of uninitialised
> global variables won't be zero but will be the random memory contents instead.
> If you want it to be zero like the C standards say, just add a little startup
> code that zeros it. You can make the linker script define symbols at the start
> and end of .bss so that your zeroing code knows where it is in memory.

Thanks. How can I make LD emit these symbols? I need to determine the
size of the image because I need to know how much to lead from the
boot media.

FYI, after reading your mail, I switched the order of .bss and
.data. This seems to have forced ld to reserve the space for .bss
within my output image, and I now have the behavior I want. Are there
any problems with having .bss between .text and .data?

Ivan...

---------------------------------------------------------------------------
			     Ivan Pulleyn
		      4942 N. Winchester Ave. #3
			  Chicago, IL 60640

			   ivan@torpid.com
			    (847) 980-1400
---------------------------------------------------------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]