This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 3.3 problem of -fzero-initialized-in-bss w/-ffreestanding


Geoff Keating wrote:
Um, GCC already assumes that it happens before any code is run.  When
does your system do it?

I don't think this is an appropriate thing for -ffreestanding.
Non-hosted environments must still provide all the support
infrastructure that hosted ones do, with the exception of certain
headers and library routines.

C99 also specifies it should happen before any code is run:


From 5.1.2:

	Two execution environments are defined: freestanding
	and hosted.  In both cases, program startup occurs when
	a designated C function is called by the execution
	environment.  All objects in static storage shall be
	initialized (set to their initial values) before program
	startup.


Segher




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