gmon-sol2.c (internal_mcount): Assume either _start or _init begins the text segment.
authorRichard Henderson <rth@redhat.com>
Sun, 24 Mar 2002 02:23:08 +0000 (18:23 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Sun, 24 Mar 2002 02:23:08 +0000 (18:23 -0800)
        * config/sparc/gmon-sol2.c (internal_mcount): Assume either
        _start or _init begins the text segment.

From-SVN: r51248

gcc/ChangeLog
gcc/config/sparc/gmon-sol2.c

index 3146903e73b449e0d0d5297b57b6d9f65d462d1a..ed88252a71d1471e1258bc3048ca0f4b8bbeea5d 100644 (file)
@@ -1,3 +1,8 @@
+2002-03-23  Richard Henderson  <rth@redhat.com>
+
+       * config/sparc/gmon-sol2.c (internal_mcount): Assume either
+       _start or _init begins the text segment.
+
 2002-03-23  David Edelsohn  <edelsohn@gnu.org>
 
        * config/rs6000/rs6000.h (RETURN_IN_MEMORY):  Cast to HOST_WIDE_INT
index 6d6696644d9108d90357d1eb0f4340533c5e52e0..bcb0c060358aead42796712cd21a2a969727527f 100644 (file)
@@ -291,8 +291,10 @@ static void internal_mcount(selfpc, frompcindex)
 
        if(!already_setup) {
           extern char etext[];
+         extern char _start[];
+         extern char _init[];
          already_setup = 1;
-         monstartup(0, (char *)etext);
+         monstartup(_start < _init ? _start : _init, etext);
 #ifdef USE_ONEXIT
          on_exit(_mcleanup, 0);
 #else