This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc with no stack at all?
- To: gcc at gcc dot gnu dot org, jgarzik at mandrakesoft dot com
- Subject: Re: gcc with no stack at all?
- From: Mike Stump <mrs at windriver dot com>
- Date: Thu, 30 Mar 2000 19:05:08 -0800 (PST)
> Date: Thu, 30 Mar 2000 20:11:31 -0500
> From: Jeff Garzik <jgarzik@mandrakesoft.com>
>
> For low-level BIOS type code, some portions of early chipset init must
> run without a stack.
Right.
> Is it possible to write gcc-compilable C code which doesn't require a
> stack at all?
Sure, trivial:
foo() { asm ("startupocode: bla bla bla; jsr main ; bla bla bla ..."); }
> I don't see any '-fno-stack' option in gcc.info*, but I was
> wondering if it could be done implicitly, for example '-fno-builtin'
> plus no local vars plus an all-register calling convention.
No.
Welcome to startup code programming. This is the wrong list to ask
how to program kernels. If you want a hint, look at newlib's
libgloss. See sourceware.cygnus.com to find newlib.