From: Robert Millan <rmh@aybabtu.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: Non-static variables and nested function pointers [bug #28392]
Date: Thu, 24 Dec 2009 23:12:43 +0100 [thread overview]
Message-ID: <20091224221243.GT12122@thorin> (raw)
In-Reply-To: <alpine.GSO.2.00.0912231416110.12423@oretfbsg.Jrfg.Fha.PBZ>
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
next prev parent reply other threads:[~2009-12-24 22:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-23 20:48 Non-static variables and nested function pointers [bug #28392] Grégoire Sutre
2009-12-23 22:17 ` Seth Goldberg
2009-12-24 1:56 ` Grégoire Sutre
2009-12-24 2:07 ` Seth Goldberg
2009-12-24 3:33 ` Grégoire Sutre
2009-12-24 3:50 ` Seth Goldberg
2009-12-24 3:52 ` Seth Goldberg
2009-12-24 22:12 ` Robert Millan [this message]
2009-12-26 18:43 ` Grégoire Sutre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091224221243.GT12122@thorin \
--to=rmh@aybabtu.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.