Skip to content
Snippets Groups Projects
Commit f8884b9c authored by Sebastian Huber's avatar Sebastian Huber
Browse files

gcov: Fix use of profile info section

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.  Mark it as
referenced.

gcc/
	* coverage.c (build_gcov_info_var_registration): Mark the object placed
	in the linker set as referenced so that it does not get optimized away.
parent e0335bb7
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment