This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] x86: Add support for frame pointer less mcount
- From: Richard Henderson <rth at twiddle dot net>
- To: Andi Kleen <andi at firstfloor dot org>
- Cc: libc-alpha at sourceware dot org
- Date: Mon, 02 Aug 2010 09:16:48 -0700
- Subject: Re: [PATCH] x86: Add support for frame pointer less mcount
- References: <20100731081928.GA20519@basil.fritz.box>
On 07/31/2010 01:19 AM, Andi Kleen wrote:
> + ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(__fentry__)
> + ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(__fentry__), @function)
> + .align ALIGNARG(4)
> +C_LABEL(__fentry__)
> + /* Allocate space for 7 registers. */
> + subq $56,%rsp
...
> + call C_SYMBOL_NAME(__mcount_internal)
You've an unaligned stack here.
%16 = 0
caller return address
fentry return address
64 bytes local
%16 = 0
mcount_internal return address
would be correct.
The i386 version should have been compiled with -mpreferred-stack-boundary=2,
so that one doesn't care about stack alignment.
r~