相关疑难解决方法(0)

GCC配置文件引导优化(PGO)收集哪些信息以及哪些优化使用它?

我启用时GCC会收集哪些信息-fprofile-generate,哪些优化确实使用了收集的信息(设置-fprofile-use标志时)?

我需要引用这里.我已经搜索了一段时间,但没有找到任何记录.

有关链接时间优化(LTO)的信息将是一个加号!= d

c++ gcc lto pgo

39
推荐指数
2
解决办法
2万
查看次数

如何在链接时重新定位__gcov_init未定义的引用问题

我现在正在进行C代码覆盖率研究并遇到以下问题,GCC版本4.4.6:

  1. 添加了编译器标志CFLAGS = --coverage和链接器选项LDFLAGS := --coverageLOCAL_LDLIBS := --coverage得到错误:

undefined reference to '__gcov_init'" and "undefined reference to '__gcov_merge_add'

  1. 添加选项LOCAL_LDFLAGS := --coverage,并收到链接错误:

libgcov.a(_gcov.o): in function __gcov_set_sampling_rate: undefined reference to '__gcov_sampling_rate' libgcov.a(_gcov.o): in function gcov_exit: undefined reference to '__gcov_pmu_profile_filename' libgcov.a(_gcov.o): in function __gcov_init: undefined reference to '__gcov_pmu_profile_options' '__gcov_pmu_top_n_address'

有人可以帮忙就这个问题提供一些建议吗?

linker gcov undefined-reference

38
推荐指数
3
解决办法
3万
查看次数

标签 统计

c++ ×1

gcc ×1

gcov ×1

linker ×1

lto ×1

pgo ×1

undefined-reference ×1