Пропавшие без вести gcov символы с mingw в соответствии с Ubuntu 16.04

Прежде, чем обновить от Ubuntu 14.04 до Ubuntu 16.04 я мог скомпилировать следующий код с mingw-64-gcc

x86_64-w64-mingw32-gcc - fprofile-генерируют-o test.exe test.c-lgcov - статичный

//test.c
#include <stdio.h>
int main(void)
{puts("test");return 0;}

Теперь программа не может быть связана из-за пропавших без вести __ gcov символы.

x86_64-w64-mingw32-gcc -fprofile-generate -o test test.c
/tmp/cccj8pnx.o:test.c:(.text+0x1a): undefined reference to `__gcov_indirect_call_profiler_v2'
/tmp/cccj8pnx.o:test.c:(.text+0x46): undefined reference to `__gcov_time_profiler'
/tmp/cccj8pnx.o:test.c:(.data+0xa0): undefined reference to `__gcov_merge_time_profile'
/tmp/cccj8pnx.o:test.c:(.rdata$.refptr.__gcov_indirect_call_callee[.refptr.__gcov_indirect_call_callee]+0x0): undefined reference to `__gcov_indirect_call_callee'
collect2: error: ld returned 1 exit status

Что изменилось между между двумя версиями Ubuntu. Любая справка ценилась бы.

1
задан 29 August 2016 в 01:20

1 ответ

Я столкнулся с этой той же проблемой, и я смог работать вокруг этого путем соединения с -fprofile-arcs, а не -lgcov.

0
ответ дан 8 December 2019 в 09:08

Другие вопросы по тегам:

Похожие вопросы: