]> xenbits.xensource.com Git - xen.git/commit
coverage: filter out libfdt.o and libelf.o
authorViktor Mitin <viktor.mitin.19@gmail.com>
Thu, 16 May 2019 13:20:16 +0000 (16:20 +0300)
committerJulien Grall <julien.grall@arm.com>
Mon, 20 May 2019 12:29:58 +0000 (13:29 +0100)
commit6ac66c9cbb58abf34fc67e8e4ebb9d17bb207964
tree7c8f513b991df526e825bf7f560741bf7d2d49fb
parentae0e5f204cb42440e244419e6a92f7fd90eb25bb
coverage: filter out libfdt.o and libelf.o

While the build system explicitly compiles any .init object without gcov
option, this does not cover the libraries libfdt and libelf. This is
because the two
libraries are built normally and then some sections will have .init
append.

As coverage will be enabled for libfdt, some of the GCOV counters may be
stored in a section that will be stripped after init. On Arm64, this
will reliably result to a crash when 'xencov' will ask to reset the
counters.

Interestingly, on x86, all the counters for libelf seems to be in
sections that will not be renamed so far. Hence, why this was not
discovered before. But this is a latent bug.

As the two libraries can only be used at boot, it is fine to disable
coverage for the entire library.

Reported-by: Viktor Mitin <viktor.mitin.19@gmail.com>
Suggested-by: Julien Grall <julien.grall@arm.com>
Signed-off-by: Viktor Mitin <viktor.mitin.19@gmail.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Julien Grall <julien.grall@arm.com>
[julien: Reword commit message]
Signed-off-by: Julien Grall <julien.grall@arm.com>
xen/common/libelf/Makefile
xen/common/libfdt/Makefile