[Skiboot] [PATCH 5/5] extract-gcov: Add checksum field

Reza Arbab arbab at linux.ibm.com
Sat Mar 15 04:25:15 AEDT 2025


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 <arbab at linux.ibm.com>
---
 extract-gcov.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/extract-gcov.c b/extract-gcov.c
index 2acc51df91de..0251ac417298 100644
--- a/extract-gcov.c
+++ b/extract-gcov.c
@@ -143,6 +143,9 @@ static void write_gcda(char *addr, struct gcov_info* gi)
 	write_u32(fd, GCOV_DATA_MAGIC);
 	write_u32(fd, be32toh(gi->version));
 	write_u32(fd, be32toh(gi->stamp));
+#if TARGET__GNUC__ >= 12
+	write_u32(fd, 0); /* checksum */
+#endif
 
 	printf("version: %x\tstamp: %d\n", be32toh(gi->version), be32toh(gi->stamp));
 	printf("nfunctions: %d \n", be32toh(gi->n_functions));
-- 
2.43.5



More information about the Skiboot mailing list