------- Comment #20 from jh at suse dot cz 2008-02-24 20:49 -------
Subject: Re: Stack not aligned at mod 16 byte boundary in x86_64 code
Hi,
what about this patch. There seems to be availablity check missing
earlier in code. This way GCC will always align calls to functions that
might be overwritten (thus resolved by dynamic linker) with exception of
the recursive calls..
I still wonder how this problem can hit us so late: if we was
misaligning commonly stack on PIC calls and dynamic linker was crashing
on it, I would expect darwin to be unable to boot at all...
Honza
Index: calls.c
===================================================================
--- calls.c (revision 132575)
+++ calls.c (working copy)
@@ -2102,7 +2102,9 @@ expand_call (tree exp, rtx target, int i
if (fndecl)
{
struct cgraph_rtl_info *i = cgraph_rtl_info (fndecl);
- if (i && i->preferred_incoming_stack_boundary)
+ if (i && i->preferred_incoming_stack_boundary
+ && (cgraph_function_body_availability (cgraph_node (fndecl))
+ >= AVAIL_AVAILABLE))
preferred_stack_boundary = i->preferred_incoming_stack_boundary;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35271