Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src In the ELF toolchain, use __mcount instead of mcount.



details:   https://anonhg.NetBSD.org/src/rev/5232b787ca13
branches:  trunk
changeset: 500173:5232b787ca13
user:      kleink <kleink%NetBSD.org@localhost>
date:      Thu Dec 07 10:14:08 2000 +0000

description:
In the ELF toolchain, use __mcount instead of mcount.

diffstat:

 gnu/dist/gcc/config/m68k/netbsd-elf.h |   6 +++---
 sys/arch/m68k/include/profile.h       |  10 ++++++++--
 2 files changed, 11 insertions(+), 5 deletions(-)

diffs (48 lines):

diff -r 87bb0b9e949c -r 5232b787ca13 gnu/dist/gcc/config/m68k/netbsd-elf.h
--- a/gnu/dist/gcc/config/m68k/netbsd-elf.h     Thu Dec 07 08:40:06 2000 +0000
+++ b/gnu/dist/gcc/config/m68k/netbsd-elf.h     Thu Dec 07 10:14:08 2000 +0000
@@ -345,16 +345,16 @@
 #define JUMP_TABLES_IN_TEXT_SECTION 1
 
 /* Output assembler code to FILE to increment profiler label # LABELNO
-   for profiling a function entry.  XXX should have _mcount.  */
+   for profiling a function entry. */
 
 #undef FUNCTION_PROFILER
 #define FUNCTION_PROFILER(FILE, LABELNO) \
 do {                                                                   \
   asm_fprintf (FILE, "\tlea (%LLP%d,%Rpc),%Ra1\n", (LABELNO));         \
   if (flag_pic)                                                                \
-    fprintf (FILE, "\tbsr.l mcount@PLTPC\n");                          \
+    fprintf (FILE, "\tbsr.l __mcount@PLTPC\n");                                \
   else                                                                 \
-    fprintf (FILE, "\tjbsr mcount\n");                                 \
+    fprintf (FILE, "\tjbsr __mcount\n");                               \
 } while (0)
 
 /* Register in which address to store a structure value is passed to a
diff -r 87bb0b9e949c -r 5232b787ca13 sys/arch/m68k/include/profile.h
--- a/sys/arch/m68k/include/profile.h   Thu Dec 07 08:40:06 2000 +0000
+++ b/sys/arch/m68k/include/profile.h   Thu Dec 07 10:14:08 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: profile.h,v 1.9 2000/11/22 12:39:03 leo Exp $  */
+/*     $NetBSD: profile.h,v 1.10 2000/12/07 10:14:09 kleink Exp $      */
 
 /*
  * Copyright (c) 1992, 1993
@@ -37,8 +37,14 @@
 
 #define        _MCOUNT_DECL static __inline void _mcount
 
+#ifdef __ELF__
+#define        MCOUNT_ENTRY    "__mcount"
+#else
+#define        MCOUNT_ENTRY    "mcount"
+#endif
+
 #define        MCOUNT \
-extern void mcount __P((void)) __asm__("mcount"); void mcount() { \
+extern void mcount __P((void)) __asm__(MCOUNT_ENTRY); void mcount() { \
        int selfpc, frompcindex; \
        __asm__("movl %%a6@(4),%0" : "=r" (selfpc)); \
        __asm__("movl %%a6@(0)@(4),%0" : "=r" (frompcindex)); \



Home | Main Index | Thread Index | Old Index