[Cbe-oss-dev] [PATCH] libspe: elfspe: set argv[argc] = NULL

Benjamin Herrenschmidt benh at kernel.crashing.org
Fri Jun 1 11:52:21 EST 2007


On Thu, 2007-05-24 at 11:40 +0900, Noguchi, Masato wrote:
> Hi all,
> Thanks for your replies.
> 
> > There are many application that depend on environment variables in
> some
> > way, but elfspe currently does not pass the environment down to the 
> > application at all.
> > Implementing the third (optional) argument to main should be easy 
> > enough, and it makes it possible to extend the startup code to 
> > provide 'environ' later, if necessary.
> 
> I felt too that it's reasonable passing envp. But, it will waste some
> kilo-bytes of local storage. So I think it's necessary to define some
> environment variables like SPE_NO_ARGS so that users can select.
> BTW, is there any specification document about elfspe and/or environment
> variables used by elfspe.
> 
> Anyway, I will make patches for it with some code cleanup patches which
> make easier to add envp.

I might be reasonable to breach the standard a bit and define that the
environment variables are actually located in main storage and not LS.
There is no need to have any kernel of performance on access to them and
that would save precious LS space. That means it can't ust be a char **
but I suppose that's fair enough if defined properly in the SPE ABI. 

Ben.




More information about the cbe-oss-dev mailing list