This is the mail archive of the
mailing list for the GCC project.
Re: 3.3 problem of -fzero-initialized-in-bss w/-ffreestanding
- From: Geoff Keating <geoffk at geoffk dot org>
- To: obrien at FreeBSD dot org
- Cc: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>, gcc at gcc dot gnu dot org
- Date: 14 Jul 2003 13:51:44 -0700
- Subject: Re: 3.3 problem of -fzero-initialized-in-bss w/-ffreestanding
- References: <20030714173201.GB74108@dragon.nuxi.com>
"David O'Brien" <obrien@FreeBSD.org> writes:
> GCC 3.3 now has -fzero-initialized-in-bss as the default. That is fine
> and dandy for userland programs. But it caused a major problem for the
> FreeBSD kernel when we upgraded from 3.2.2 to 3.3.1 [snapshot].
> -no-zero-initialized-in-bss should be the default when -ffreestanding is
> specified -- GCC should not^H^H^Hcannot make assumptions about when BSS
> zeroing occurs in an -ffreestanding environment.
> Can this change be made for 3.3.1 release?
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.
Is there some reason that your kernel can't just specify the flag that
GCC already has to control this?
- Geoffrey Keating <firstname.lastname@example.org>