Re: [PATCH] gcov: Fix use of profile info section

2021-07-20 Thread Jeff Law via Gcc-patches
On 7/14/2021 1:46 AM, Sebastian Huber wrote: If the -fprofile-info-section is used, then the gcov information is registered in a linker set. This is done by build_gcov_info_var_registration(). The compiler generated object placed in the section was not marked as referenced, so once

[PATCH] gcov: Fix use of profile info section

2021-07-14 Thread Sebastian Huber
If the -fprofile-info-section is used, then the gcov information is registered in a linker set. This is done by build_gcov_info_var_registration(). The compiler generated object placed in the section was not marked as referenced, so once optimization was enabled, this object was optimized away.