On Tue, 2008-04-15 at 15:38 +0200, Robert Millan wrote:
> On Tue, Apr 15, 2008 at 12:30:40AM +0200, Lubomir Kundrak wrote:
> > diff -rup grub-1.95.orig/kern/main.c grub-1.95/kern/main.c
> > --- grub-1.95.orig/kern/main.c      2007-01-29 15:31:36.000000000 +0100
> > +++ grub-1.95/kern/main.c   2007-01-30 18:29:55.000000000 +0100
> > @@ -106,6 +106,14 @@ grub_load_normal_mode (void)
> >    grub_errno = GRUB_ERR_NONE;
> >  }
> >  
> > +#ifndef GRUB_UTIL
> > +/*
> > + * Let GDB find the stack top
> > + */
> > +void
> > +main (void) __attribute__ ((alias("grub_main")));
> > +#endif
> 
> grub_main() isn't always the function we want for top of the stack.  For
> example cmain() in kern/ieee1275/cmain.c does quite a bit of things already.
> 
> I'm not sure what would be an ellegant way to solve this... :-/

Well, then more preprocessor conditionals come into play. Wold there be
any problems with that?

-- 
Lubomir Kundrak (Red Hat Security Response Team)



_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to