[Top] [All Lists]

Re: Saving arguments on the stack

To: Nigel Stephens <>
Subject: Re: Saving arguments on the stack
From: Ralf Baechle <>
Date: Tue, 22 Nov 2005 11:24:17 +0000
Cc: "Kevin D. Kissell" <>, "Knittel, Brian" <>,
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <>
User-agent: Mutt/
On Tue, Nov 22, 2005 at 11:21:13AM +0000, Nigel Stephens wrote:

> >>I'd like to force the compiler to store arguments on the stack with 
> >>otherwise optimized code.
> >>
> >>I found a refernce in the archives (form 2001) for using -0 (no 
> >>optimization). Has anyone found another way to do this?
> >
> >
> >If I recall correctly, if you specify -g to enable debugger support,
> >the subroutine prologues store the arguments into their stack slots,
> >even if a higher level of optimization is otherwise specified.
> 'Fraid not: the -g option only adds debug info to the object file, it 
> shouldn't alter the generated code. Using -O0 will certainly store 
> everything on the stack, but it also won't be "with otherwise optimized 
> code".

And the kernel won't build without optimization - but that's FAQ since
10 years.


<Prev in Thread] Current Thread [Next in Thread>