Can glibc use the gcov to test the code coverage?

28 Views Asked by At

I want to test code coverage of one glibc source code file(such as dl-load.c) use gcov, can it happen? and how to do it?

I refered to this: How to resolve __gcov_init undefined reference issue when linking

and try to make, found the build errors: /bin/../lib/gcc/aarch64-none-linux-gnu/10.3.1/libgcov.a(_gcov.o): in function gcov_write_block': GNU-toolchain/arm-10/src/gcc/libgcc/../gcc/gcov-io.c:268: undefined reference to fwrite' ../lib/gcc/aarch64-none-linux-gnu/10.3.1/libgcov.a(_gcov.o): in function gcov_read_words': arm-10/src/gcc/libgcc/../gcc/gcov-io.c:491: undefined reference to fread' .... ....

0

There are 0 best solutions below