From: Ulrich Drepper Date: Fri, 11 Oct 2002 18:56:32 +0000 (+0000) Subject: (profil_counter): Add hack to prevent the compiler from clobbering the signal context. X-Git-Tag: cvs/initial~271 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bd97565d089431795f0ee0546a08a0bafd39903a;p=platform%2Fupstream%2Fglibc.git (profil_counter): Add hack to prevent the compiler from clobbering the signal context. --- diff --git a/sysdeps/unix/sysv/linux/i386/profil-counter.h b/sysdeps/unix/sysv/linux/i386/profil-counter.h index 9af0cbb..d592a7b 100644 --- a/sysdeps/unix/sysv/linux/i386/profil-counter.h +++ b/sysdeps/unix/sysv/linux/i386/profil-counter.h @@ -1,5 +1,5 @@ /* Low-level statistical profiling support function. Linux/i386 version. - Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -21,7 +21,12 @@ #include static void -profil_counter (int signo, SIGCONTEXT scp) +profil_counter (int signo, const SIGCONTEXT scp) { profil_count ((void *) GET_PC (scp)); + + /* This is a hack to prevent the compiler from implementing the + above function call as a sibcall. The sibcall would overwrite + the signal context. */ + asm volatile (""); }