From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dedi548.your-server.de (dedi548.your-server.de [85.10.215.148]) by sourceware.org (Postfix) with ESMTPS id 772B33857814 for ; Mon, 9 Nov 2020 17:45:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 772B33857814 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embedded-brains.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=sebastian.huber@embedded-brains.de Received: from sslproxy02.your-server.de ([78.47.166.47]) by dedi548.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1kcBEa-0007aK-WF for gcc@gcc.gnu.org; Mon, 09 Nov 2020 18:45:41 +0100 Received: from [82.100.198.138] (helo=mail.embedded-brains.de) by sslproxy02.your-server.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1kcBEa-000XOW-Tk for gcc@gcc.gnu.org; Mon, 09 Nov 2020 18:45:40 +0100 Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id EA4682A1610 for ; Mon, 9 Nov 2020 18:43:03 +0100 (CET) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 3em0-qvlodTE for ; Mon, 9 Nov 2020 18:43:03 +0100 (CET) Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 78FFA2A165B for ; Mon, 9 Nov 2020 18:43:03 +0100 (CET) X-Virus-Scanned: amavisd-new at zimbra.eb.localhost Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 2j8kIs8jwF9C for ; Mon, 9 Nov 2020 18:43:03 +0100 (CET) Received: from shuber-nb-linux.eb.localhost (unknown [10.10.171.18]) by mail.embedded-brains.de (Postfix) with ESMTPSA id 538372A1610 for ; Mon, 9 Nov 2020 18:43:03 +0100 (CET) To: gcc@gcc.gnu.org From: Sebastian Huber Subject: Gcov info registration without constructor? Message-ID: <4c921363-879d-5c4a-cda6-f0fcce4f7719@embedded-brains.de> Date: Mon, 9 Nov 2020 18:45:39 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Authenticated-Sender: smtp-embedded@poldinet.de X-Virus-Scanned: Clear (ClamAV 0.102.4/25983/Mon Nov 9 14:20:27 2020) X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Nov 2020 17:45:44 -0000 Hello, I would like to use the -ftest-coverage -fprofile-arcs support on a bare=20 metal system (no operating system or very early stages in the system=20 startup). In this environment I cannot use the gcov info registration=20 via a constructor and __gcov_init(), because there may be some other=20 (more complex) constructors registered which cannot be called at this=20 stage.. Would it be acceptable to add a compiler option which changes=20 the gcov info registration via a constructor to a linker set? If=20 enabled, then for each translation unit (see coverage_obj_init()) a=20 pointer to the gcov info is placed into a special linker section (for=20 example .gcov_info). The linker script collects all .gcov_info data and=20 adds a begin/end symbol. The runtime support can then iterate over all=20 linker section entries (pointers to struct gcov_info) to dump the=20 aggregated gcov data during program termination. Would such changes be=20 acceptable for GCC integration or is this too specific? Kind regards, =C2=A0=C2=A0=C2=A0 Sebastian --=20 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=C3=BCnchen Registernummer: HRB 157899 Vertretungsberechtigte Gesch=C3=A4ftsf=C3=BChrer: Peter Rasmussen, Thomas= D=C3=B6rfler Unsere Datenschutzerkl=C3=A4rung finden Sie hier: https://embedded-brains= .de/datenschutzerklaerung/