linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gcov: Add support for checksum field
@ 2022-12-19 15:06 Rickard Andersson
  2022-12-19 16:48 ` Peter Oberparleiter
  0 siblings, 1 reply; 3+ messages in thread
From: Rickard Andersson @ 2022-12-19 15:06 UTC (permalink / raw)
  To: linux-kernel, oberpar; +Cc: rickard314.andersson, mliska, Rickard x Andersson

From: Rickard x Andersson <rickaran@axis.com>

In GCC version 12.1 a checksum field was added.

Signed-off-by: Rickard x Andersson <rickaran@axis.com>
---
 kernel/gcov/gcc_4_7.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/kernel/gcov/gcc_4_7.c b/kernel/gcov/gcc_4_7.c
index c699feda21ac..04880d8fba25 100644
--- a/kernel/gcov/gcc_4_7.c
+++ b/kernel/gcov/gcc_4_7.c
@@ -85,6 +85,7 @@ struct gcov_fn_info {
  * @version: gcov version magic indicating the gcc version used for compilation
  * @next: list head for a singly-linked list
  * @stamp: uniquifying time stamp
+ * @checksum: unique object checksum
  * @filename: name of the associated gcov data file
  * @merge: merge functions (null for unused counter type)
  * @n_functions: number of instrumented functions
@@ -97,6 +98,10 @@ struct gcov_info {
 	unsigned int version;
 	struct gcov_info *next;
 	unsigned int stamp;
+ /* Since GCC 12.1 a checksum field is added. */
+#if (__GNUC__ >= 12)
+	unsigned int checksum;
+#endif
 	const char *filename;
 	void (*merge[GCOV_COUNTERS])(gcov_type *, unsigned int);
 	unsigned int n_functions;
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-12-20 12:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-19 15:06 [PATCH] gcov: Add support for checksum field Rickard Andersson
2022-12-19 16:48 ` Peter Oberparleiter
2022-12-20 12:12   ` Martin Liška

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).