aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--elf/dl-profile.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 6fa95fa425..4bd53ca5cc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-05-17 Ulrich Drepper <drepper@redhat.com>
+
+ * elf/dl-profile.c (_dl_mcount): Check whether state is
+ GMON_PROF_ON before doing anything.
+
2001-05-17 H.J. Lu <hjl@gnu.org>
* elf/sprof.c (read_symbols): Move "++symtab" into the while loop.
diff --git a/elf/dl-profile.c b/elf/dl-profile.c
index f1479dea3f..067a32d352 100644
--- a/elf/dl-profile.c
+++ b/elf/dl-profile.c
@@ -439,6 +439,9 @@ _dl_mcount (ElfW(Addr) frompc, ElfW(Addr) selfpc)
/* XXX I think this is now not necessary anymore. */
if (! compare_and_swap (&state, GMON_PROF_ON, GMON_PROF_BUSY))
return;
+#else
+ if (state != GMON_PROF_ON)
+ return;
#endif
/* Compute relative addresses. The shared object can be loaded at