Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gcov: support GCC 7.1

Starting from GCC 7.1, __gcov_exit is a new symbol expected to be
implemented in a profiling runtime.

[akpm@linux-foundation.org: coding-style fixes]
[mliska@suse.cz: v2]
Link: http://lkml.kernel.org/r/e63a3c59-0149-c97e-4084-20ca8f146b26@suse.cz
Link: http://lkml.kernel.org/r/8c4084fa-3885-29fe-5fc4-0d4ca199c785@suse.cz
Signed-off-by: Martin Liska <mliska@suse.cz>
Acked-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Martin Liska and committed by
Linus Torvalds
05384213 8d35bb31

+9 -1
+6
kernel/gcov/base.c
··· 98 98 } 99 99 EXPORT_SYMBOL(__gcov_merge_icall_topn); 100 100 101 + void __gcov_exit(void) 102 + { 103 + /* Unused. */ 104 + } 105 + EXPORT_SYMBOL(__gcov_exit); 106 + 101 107 /** 102 108 * gcov_enable_events - enable event reporting through gcov_event() 103 109 *
+3 -1
kernel/gcov/gcc_4_7.c
··· 18 18 #include <linux/vmalloc.h> 19 19 #include "gcov.h" 20 20 21 - #if (__GNUC__ > 5) || (__GNUC__ == 5 && __GNUC_MINOR__ >= 1) 21 + #if (__GNUC__ >= 7) 22 + #define GCOV_COUNTERS 9 23 + #elif (__GNUC__ > 5) || (__GNUC__ == 5 && __GNUC_MINOR__ >= 1) 22 24 #define GCOV_COUNTERS 10 23 25 #elif __GNUC__ == 4 && __GNUC_MINOR__ >= 9 24 26 #define GCOV_COUNTERS 9