aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2020-05-28 08:16:58 +0200
committerMartin Liska <mliska@suse.cz>2020-05-28 08:18:21 +0200
commit17d1594bfe08f3c768e024b180816cbe37ac08ac (patch)
treef16e3c2caa50407dafc752f7e7b5eac59522a328 /libgcc
parent61f3b60556e8d4da298906ac4f4effc3d18c6ea1 (diff)
downloadgcc-17d1594bfe08f3c768e024b180816cbe37ac08ac.zip
gcc-17d1594bfe08f3c768e024b180816cbe37ac08ac.tar.gz
gcc-17d1594bfe08f3c768e024b180816cbe37ac08ac.tar.bz2
gcov-tool: Flexible endian adjustment for merging coverage data
gcc/ChangeLog: 2020-05-27 Dong JianQiang <dongjianqiang2@huawei.com> PR gcov-profile/95332 * gcov-io.c (gcov_var::endian): Move field. (from_file): Add IN_GCOV_TOOL check. * gcov-io.h (gcov_magic): Ditto. libgcc/ChangeLog: 2020-05-27 Dong JianQiang <dongjianqiang2@huawei.com> PR gcov-profile/95332 * libgcov-util.c (read_gcda_file): Call gcov_magic. * libgcov.h (gcov_magic): Disable GCC poison.
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/libgcov-util.c5
-rw-r--r--libgcc/libgcov.h2
2 files changed, 3 insertions, 4 deletions
diff --git a/libgcc/libgcov-util.c b/libgcc/libgcov-util.c
index 449638b..fff54c6 100644
--- a/libgcc/libgcov-util.c
+++ b/libgcc/libgcov-util.c
@@ -261,7 +261,7 @@ read_gcda_file (const char *filename)
{
unsigned tags[4];
unsigned depth = 0;
- unsigned magic, version;
+ unsigned version;
struct gcov_info *obj_info;
int i;
@@ -276,8 +276,7 @@ read_gcda_file (const char *filename)
}
/* Read magic. */
- magic = gcov_read_unsigned ();
- if (magic != GCOV_DATA_MAGIC)
+ if (!gcov_magic (gcov_read_unsigned (), GCOV_DATA_MAGIC))
{
fnotice (stderr, "%s:not a gcov data file\n", filename);
gcov_close ();
diff --git a/libgcc/libgcov.h b/libgcc/libgcov.h
index 104b80b..b248690 100644
--- a/libgcc/libgcov.h
+++ b/libgcc/libgcov.h
@@ -147,7 +147,7 @@ extern struct gcov_info *gcov_list;
/* Poison these, so they don't accidentally slip in. */
#pragma GCC poison gcov_write_string gcov_write_tag gcov_write_length
-#pragma GCC poison gcov_time gcov_magic
+#pragma GCC poison gcov_time
#ifdef HAVE_GAS_HIDDEN
#define ATTRIBUTE_HIDDEN __attribute__ ((__visibility__ ("hidden")))