linux-um archives
 help / color / mirror / Atom feed
From: Alex Hung <alex.hung@amd.com>
To: richard@nod.at, anton.ivanov@cambridgegreys.com,
	johannes@sipsolutions.net, linux-um@lists.infradead.org
Cc: alex.hung@amd.com
Subject: Re: [PATCH] um: fix CONFIG_GCOV for built-in code
Date: Mon, 10 Aug 2026 07:51:56 -0600	[thread overview]
Message-ID: <a77a9f06-fa26-4687-9722-1e54dc771fce@amd.com> (raw)
In-Reply-To: <20260727195515.2306731-1-alex.hung@amd.com>

Hi,

Any comments or concerns on this patch? Is it ready to be merged?

On 7/27/26 13:55, Alex Hung wrote:
> From: Johannes Berg <johannes@sipsolutions.net>
> 
> With contemporary toolchains, CONFIG_GCOV doesn't work because
> gcov now relies on both init and exit handlers, but those are
> discarded from the binary. Fix the linker scripts to keep them
> instead, so that CONFIG_GCOV can work again.
> 
> Note that this does not make it work in modules yet, since we
> don't call their exit handlers.
> 
> Note: the .init_array.* wildcard and the RUNTIME_DISCARD_EXIT
> define are already present in this tree; only the matching
> .fini_array.* wildcard remained to be added.
> 
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
> Signed-off-by: Alex Hung <alex.hung@amd.com>
> ---
> 
> This is a revived patch. The original can be found at
> https://lkml.iu.edu/hypermail/linux/kernel/2103.1/06608.html
> 
>   arch/um/include/asm/common.lds.S | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/arch/um/include/asm/common.lds.S b/arch/um/include/asm/common.lds.S
> index fd481ac371de..2ed213913afe 100644
> --- a/arch/um/include/asm/common.lds.S
> +++ b/arch/um/include/asm/common.lds.S
> @@ -91,6 +91,7 @@
>     .fini_array : {
>   	__fini_array_start = .;
>   	*(.fini_array)
> +	*(.fini_array.*)
>   	__fini_array_end = .;
>     }
> 
> --
> 2.43.0
> 



  reply	other threads:[~2026-08-10 13:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-27 19:55 [PATCH] um: fix CONFIG_GCOV for built-in code Alex Hung
2026-08-10 13:51 ` Alex Hung [this message]
2026-08-21 15:25   ` Alex Hung
2026-09-23  5:05 ` Mariia Nikitash
2026-09-24  3:42 ` Kees Cook
2026-09-28 18:09   ` Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a77a9f06-fa26-4687-9722-1e54dc771fce@amd.com \
    --to=alex.hung@amd.com \
    --cc=anton.ivanov@cambridgegreys.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-um@lists.infradead.org \
    --cc=richard@nod.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox