From: Jakub Jelinek <jakub@redhat.com>
To: Ulrich Drepper <drepper@redhat.com>, Roland McGrath <roland@redhat.com>
Cc: Glibc hackers <libc-hacker@sources.redhat.com>
Subject: [PATCH] Apply i386/profil-counter.h changes to arm, sh and x86_64 too
Date: Mon, 14 Oct 2002 07:27:00 -0000 [thread overview]
Message-ID: <20021013215856.E3451@sunsite.ms.mff.cuni.cz> (raw)
Hi!
These 3 arches apparently use some struct instead of struct * as argument to
profil_counter, thus might see the same problem. Am not exactly sure whether
all of the arches support sibcall already, at least x86_64 doesn't yet but
probably will do soon, but it is better to do this now IMHO than to forget
about it.
2002-10-13 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/arm/profil-counter.h (profil_counter):
Add hack to prevent the compiler from clobbering the signal context.
* sysdeps/unix/sysv/linux/sh/profil-counter.h (profil_counter):
Likewise.
* sysdeps/unix/sysv/linux/x86_64/profil-counter.h (profil_counter):
Likewise.
--- libc/sysdeps/unix/sysv/linux/sh/profil-counter.h.jj 2001-08-23 18:51:29.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/sh/profil-counter.h 2002-10-13 22:03:51.000000000 +0200
@@ -1,5 +1,5 @@
/* Low-level statistical profiling support function. Linux/SH version.
- Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 2000, 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
@@ -25,4 +25,9 @@ profil_counter (int signo, int _a2, int
void *pc;
pc = (void *) sc.sc_pc;
profil_count (pc);
+
+ /* 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 ("");
}
--- libc/sysdeps/unix/sysv/linux/arm/profil-counter.h.jj 2001-08-23 18:50:48.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/arm/profil-counter.h 2002-10-13 22:02:09.000000000 +0200
@@ -1,5 +1,5 @@
/* Low-level statistical profiling support function. Linux/ARM 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
@@ -29,4 +29,9 @@ profil_counter (int signo, int _a2, int
else
pc = (void *) sc.v21.arm_pc;
profil_count (pc);
+
+ /* 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 ("");
}
--- libc/sysdeps/unix/sysv/linux/x86_64/profil-counter.h.jj 2001-09-19 12:32:01.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/x86_64/profil-counter.h 2002-10-13 22:05:17.000000000 +0200
@@ -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 ("");
}
Jakub
reply other threads:[~2002-10-13 19:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20021013215856.E3451@sunsite.ms.mff.cuni.cz \
--to=jakub@redhat.com \
--cc=drepper@redhat.com \
--cc=libc-hacker@sources.redhat.com \
--cc=roland@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).