From 9f18d3e1a8da09598b75e9ebf1561a8909fb320e Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Wed, 3 Apr 2002 14:09:25 +0000 Subject: Teach initfini to build properly on arches where gcc tries to be sneaky behind our back... -Erik --- libc/sysdeps/linux/common/initfini.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libc/sysdeps/linux/common') diff --git a/libc/sysdeps/linux/common/initfini.c b/libc/sysdeps/linux/common/initfini.c index 9a23c55d0..4f95fbfd1 100644 --- a/libc/sysdeps/linux/common/initfini.c +++ b/libc/sysdeps/linux/common/initfini.c @@ -84,6 +84,16 @@ _init (void) module which has a constructor; but then user code's constructors would come first, and not be profiled. */ call_gmon_start (); +#else + asm ("\n/*@_init_PROLOG_PAUSES*/"); + { + /* Let GCC know that _init is not a leaf function by having a dummy + * function call here. We arrange for this call to be omitted from + * either crt file. */ + extern void i_am_not_a_leaf (void); + i_am_not_a_leaf (); + } + asm ("\n/*@_init_PROLOG_UNPAUSES*/"); #endif asm ("ALIGN"); -- cgit v1.2.3