[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] coverage: filter out lib{fdt,elf}-temp.o
On 18.01.2024 15:40, Michal Orzel wrote: > On 18/01/2024 14:12, Jan Beulich wrote: >> On 18.01.2024 13:06, Michal Orzel wrote: >>> At the moment, trying to run xencov read/reset (calling SYSCTL_coverage_op >>> under the hood) results in a crash. This is due to an attempt to >>> access code in the .init.* sections (libfdt for Arm and libelf for x86) >>> that are stripped after boot. Normally, the build system compiles any >>> *.init.o file without COV_FLAGS. However, these two libraries are >>> handled differently as sections will be renamed to init after linking. >>> >>> This worked until e321576f4047 ("xen/build: start using if_changed") >>> that added lib{fdt,elf}-temp.o to extra-y. Any file listed there without >>> *.init.o suffix will be part of non-init-objects for which COV_FLAGS >>> will be appended. >> >> While this is true, aiui COV_FLAGS would be empty for anything listed >> in nocov-y and all of the prerequisites of those objects (iirc target- >> specific variable settings propagate to prerequisites). Therefore ... > I'm not sure about this propagation. > >> >>> In such case, the solution is to add a file to nocov-y. >> >> ... libelf.o / libfdt.o already being listed there ought to suffice. >> Alternatively listing only libelf-temp.o / libfdt-temp.o ought to >> suffice as well. >> >> Since you apparently observed things not working, I must be missing >> something. > As I wrote on Matrix, I'm not a build system expert so it might be that the > issue > is due to something else. I managed to find a commit after which building the > libfdt/libelf > with coverage enabled resulted in .gcno files being present. This commit > added libfdt-temp.o > (same as libfdt.o but without sections renaming) to extra-y, hence my fix. You should probably have Cc-ed Anthony on the submission. Doing so now, so at least he's aware (and may then also look at the patch). Jan
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |