about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/x86_64
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-10-14 17:26:14 +0000
committerUlrich Drepper <drepper@redhat.com>2002-10-14 17:26:14 +0000
commit5e3ab761da1f32e0b1ec303a431be7d1be8a0250 (patch)
tree66786272f6b46c63f9b0d8aa730f4d192e06d5b8 /sysdeps/unix/sysv/linux/x86_64
parent4083e0ec2599c6d0725d7717a0621b9ab2ce276f (diff)
downloadglibc-5e3ab761da1f32e0b1ec303a431be7d1be8a0250.tar.gz
glibc-5e3ab761da1f32e0b1ec303a431be7d1be8a0250.tar.xz
glibc-5e3ab761da1f32e0b1ec303a431be7d1be8a0250.zip
(profil_counter): Add hack to prevent the compiler from clobbering the signal context.
Diffstat (limited to 'sysdeps/unix/sysv/linux/x86_64')
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/profil-counter.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/x86_64/profil-counter.h b/sysdeps/unix/sysv/linux/x86_64/profil-counter.h
index 41b99e0a88..0b244175a8 100644
--- a/sysdeps/unix/sysv/linux/x86_64/profil-counter.h
+++ b/sysdeps/unix/sysv/linux/x86_64/profil-counter.h
@@ -1,5 +1,5 @@
 /* Low-level statistical profiling support function.  Linux/x86-64 version.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001, 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
@@ -24,4 +24,9 @@ static void
 profil_counter (int signo, 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 ("");
 }