===================================================================
@@ -7774,7 +7774,7 @@ Set the directory to search for the prof
This option affects only the profile data generated by
@option{-fprofile-generate}, @option{-ftest-coverage}, @option{-fprofile-arcs}
and used by @option{-fprofile-use} and @option{-fbranch-probabilities}
-and its related options.
+and its related options. Both absolute and relative can be used.
By default, GCC will use the current directory as @var{path}, thus the
profile data file will appear in the same directory as the object file.
===================================================================
@@ -283,8 +283,9 @@ gcov_exit (void)
}
}
/* Update complete filename with stripped original. */
- if (!IS_DIR_SEPARATOR (*fname) && !HAS_DRIVE_SPEC(fname))
+ if (prefix_length != 0 && !IS_DIR_SEPARATOR (*fname))
{
+ /* If prefix is given, add directory separator. */
strcpy (gi_filename_up, "/");
strcpy (gi_filename_up + 1, fname);
}