public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Gcov info registration without constructor?
@ 2020-11-09 17:45 Sebastian Huber
  2020-11-10 12:05 ` Martin Liška
  0 siblings, 1 reply; 5+ messages in thread
From: Sebastian Huber @ 2020-11-09 17:45 UTC (permalink / raw)
  To: gcc

Hello,

I would like to use the -ftest-coverage -fprofile-arcs support on a bare 
metal system (no operating system or very early stages in the system 
startup). In this environment I cannot use the gcov info registration 
via a constructor and __gcov_init(), because there may be some other 
(more complex) constructors registered which cannot be called at this 
stage.. Would it be acceptable to add a compiler option which changes 
the gcov info registration via a constructor to a linker set? If 
enabled, then for each translation unit (see coverage_obj_init()) a 
pointer to the gcov info is placed into a special linker section (for 
example .gcov_info). The linker script collects all .gcov_info data and 
adds a begin/end symbol. The runtime support can then iterate over all 
linker section entries (pointers to struct gcov_info) to dump the 
aggregated gcov data during program termination. Would such changes be 
acceptable for GCC integration or is this too specific?

Kind regards,

     Sebastian

-- 
embedded brains GmbH
Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber@embedded-brains.de
Phone: +49-89-18 94 741 - 16
Fax:   +49-89-18 94 741 - 08
PGP: Public key available on request.

embedded brains GmbH
Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier: https://embedded-brains.de/datenschutzerklaerung/


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-11-10 18:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-09 17:45 Gcov info registration without constructor? Sebastian Huber
2020-11-10 12:05 ` Martin Liška
2020-11-10 12:35   ` Sebastian Huber
2020-11-10 16:23     ` Sebastian Huber
2020-11-10 18:13       ` Sebastian Huber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).