|
From: Adam G. <ar...@cy...> - 2004-10-18 14:41:50
|
At 01:52 PM 10/18/2004 +0200, Nicholas Nethercote wrote:
>CVS commit by nethercote:
>
>
>Arch-abstraction: a nice change that removes the need for ume_entry.S. Instead
>of using an assembly hack to find the stack pointer at startup, we find it from
>argv. It's much simpler, avoids linking games, is platform independent, and
>works on PPC.
you are assuming that sizeof( int ) == sizeof( char * ), which it won't on
64 bit platforms... just a thought.
what's wrong with:
init_sp = &argc;
?
>-int main(void)
>+int main(int argc, char** argv)
> {
> struct rlimit rlim;
>@@ -303,5 +306,7 @@ int main(void)
> valgrind_lib = cp;
>
>- assert(ume_exec_esp != NULL);
>+ // Initial stack pointer is to argc, which is immediately before argv[0]
>+ // on the stack.
>+ init_sp = argv - 1;
Seeya,
Adam
--
Real Programmers don't comment their code. If it was hard to write,
it should be hard to read, and even harder to modify.
These are all my own opinions.
|