grub-devel
[Top][All Lists]
Advanced

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

Re: Compiling grub2 on *BSD?


From: jakllsch
Subject: Re: Compiling grub2 on *BSD?
Date: Tue, 29 Jan 2008 18:37:50 -0600
User-agent: Mutt/1.5.16 (2007-06-09)

On Tue, Jan 29, 2008 at 02:47:07PM +0100, Robert Millan wrote:
> On Mon, Jan 28, 2008 at 11:30:51PM -0600, address@hidden wrote:
> > On Sun, Jan 27, 2008 at 09:56:50AM +0100, Robert Millan wrote:
> > > On Sat, Jan 26, 2008 at 12:11:48PM -0800, walt wrote:
> > > > > What is the problem initially?
> > > > 
> > > > kernel_img-kern_device.o: In function `grub_device_iterate':
> > > > ../kern/device.c:84: undefined reference to `__enable_execute_stack'
> > > > 
> > > > That's defined in libgcc so I add -lgcc to the link flags:
> > > > 
> > > > /usr/lib/libgcc.a(_enable_execute_stack.o): In function
> > > > `__enable_execute_stack':
> > > > _enable_execute_stack.c:(.text+0x40): undefined reference to `__sysctl'
> > > > _enable_execute_stack.c:(.text+0x6f): undefined reference to `mprotect'
> > > > 
> > > > Both of those symbols are defined in libc.a, so I included that, too.
> > > > Any ideas?
> > > 
> > > Do you see this line in ./configure ?
> > > 
> > >   checking whether `gcc' accepts `-fstack-protector'... yes
> > 
> > Yes.
> > 
> > Apparently -fno-stack-protector doesn't actually work the way
> > I/we would expect.
> > 
> > But, I'm surprised that this doesn't affect the building
> > of NetBSD's own 'stand' code.
> 
> Maybe we need another flag?  Could you check the link command in NetBSD's
> kernel ?

I couldn't find anything that looked like it would fix this.

I believe the reason that NetBSD's own code isn't affected by this is
because they (apparently) do not use nested functions in
their stand-alone code.

I did see OpenBSD had a -ftrampolines flag, I'm not quite sure what
it exactly does, but it may be related to this.

        Jonathan Kollasch




reply via email to

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