grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Non-static variables and nested function pointers [bug #28392]


From: Robert Millan
Subject: Re: Non-static variables and nested function pointers [bug #28392]
Date: Thu, 24 Dec 2009 23:12:43 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

On Wed, Dec 23, 2009 at 02:17:06PM -0800, Seth Goldberg wrote:
> Hi,
>
>   Your problem is probably lack of executable stack support, or at least 
> you haven't linked your application with a linker mapfile that specifies 
> an executable stack -- the callbacks require the use of trampolines to 
> access local variables, which require an executable stack.

The following snippet (kern/misc.c) comes to mind:

#ifdef NEED_ENABLE_EXECUTE_STACK
/* Some gcc versions generate a call to this function
   in trampolines for nested functions.  */
void __enable_execute_stack (void *addr __attribute__ ((unused)))
{
}
#endif

We added this for NetBSD in fact.  In that platform, GCC generates references
to this function, which are usually satisfied by libc, but we don't link with
libc, so we made it happy with an empty stub.

But this is only supposed to happen when building real GRUB.  For util/
stuff, we should use the libc facility instead.  Maybe that's not the case?

-- 
Robert Millan

  "Be the change you want to see in the world" -- Gandhi




reply via email to

[Prev in Thread] Current Thread [Next in Thread]