Skip to content

Commit 3055242

Browse files
committed
extract-gcov: Add checksum field
Since gcc commit 72e0c742bd01 ("gcov: make profile merging smarter"), gcov expects there to be a checksum field after the stamp. For our purposes it's not necessary for it to be a valid value. Signed-off-by: Reza Arbab <[email protected]>
1 parent 65bb39c commit 3055242

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

extract-gcov.c

+3
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ static void write_gcda(char *addr, struct gcov_info* gi)
143143
write_u32(fd, GCOV_DATA_MAGIC);
144144
write_u32(fd, be32toh(gi->version));
145145
write_u32(fd, be32toh(gi->stamp));
146+
#if TARGET__GNUC__ >= 12
147+
write_u32(fd, 0); /* checksum */
148+
#endif
146149

147150
printf("version: %x\tstamp: %d\n", be32toh(gi->version), be32toh(gi->stamp));
148151
printf("nfunctions: %d \n", be32toh(gi->n_functions));

0 commit comments

Comments
 (0)