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: Seth Goldberg
Subject: Re: Non-static variables and nested function pointers [bug #28392]
Date: Wed, 23 Dec 2009 18:07:39 -0800 (PST)
User-agent: Alpine 2.00 (GSO 1167 2008-08-23)



Quoting Grégoire Sutre, who wrote the following on Thu, 24 Dec 2009:

Seth Goldberg wrote:

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.

Thanks a lot for your answer ! That explains it :-)

I tried linking with -Wl,-z,execstack, but with no success, even though readelf shows a new header with this option:

Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
GNU_STACK      0x000000 0x00000000 0x00000000 0x00000 0x00000 RWE 0x4

But the problem may come from NetBSD's default policy of non-executable stack on i386 (http://www.netbsd.org/docs/kernel/non-exec.html).

Exactly -- the presence of the execstack attribute in the segment is merely a request -- the kernel is free to discard it, and many OSes do, as you've found :).

 --S

reply via email to

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