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

Re: glibc on kfreebsd-amd64 (was: Re: segfaults on amd64, one more update)

On Tue, Feb 28, 2006 at 04:04:11PM +0100, Petr Salinger wrote:
> Changes for 2nd variant are really small, could you please test them.

Works fine.  Thanks again, Petr.

> > The definition of argument passing into _startup is in ABI
> > since draft 0.94 (January 2005).
> > 
> > %rsp - 16-byte aligned pointer to stack, on top of stack is argc
> > %rdx - destructor function or zero for none
> > 
> > It was probably too late for FreeBSD to conform :-(
> > 
> > It uses 8-byte aligned %rdi for argc, %rsp is aligned %rdi.
> > All other registers are cleared, but without PCB_FULLCTX,
> > some are used internally for context switch.
> > 
> > Other solution without changing FreeBSD sources is to use %rsi 
> > instead of %rdx. It is cleared also without PCB_FULLCTX.
> > It might be better - non-threaded application will work also on stock 
> > FreeBSD.

I'm not well-versed on this, so I'd say that you do as you see more fit (as long
as you don't need to change kernel ABI of course).

Robert Millan

Reply to: