libgcov.c (gcov_exit): Set prefix_length to 0 if no relocation is needed.
authorH.J. Lu <hongjiu.lu@intel.com>
Wed, 11 May 2005 16:08:27 +0000 (16:08 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Wed, 11 May 2005 16:08:27 +0000 (09:08 -0700)
2005-05-11  H.J. Lu  <hongjiu.lu@intel.com>

* libgcov.c (gcov_exit): Set prefix_length to 0 if no relocation
is needed.

From-SVN: r99584

gcc/ChangeLog
gcc/libgcov.c

index e0af981..e618801 100644 (file)
@@ -1,3 +1,8 @@
+2005-05-11  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * libgcov.c (gcov_exit): Set prefix_length to 0 if no relocation
+       is needed.
+
 2005-05-11  Kazu Hirata  <kazu@cs.umass.edu>
 
        * fold-const.c, libgcov.c: Fix comment typos.
index 6a41097..3731a9e 100644 (file)
@@ -212,6 +212,8 @@ gcov_exit (void)
       if (IS_DIR_SEPARATOR (gcov_prefix[prefix_length - 1]))
        prefix_length--;
     }
+  else
+    prefix_length = 0;
   
   /* Allocate and initialize the filename scratch space.  */
   gi_filename = alloca (prefix_length + gcov_max_filename + 1);