linux-um archives
 help / color / mirror / Atom feed
From: Alex Hung <alex.hung@amd.com>
To: Johannes Berg <johannes@sipsolutions.net>,
	richard@nod.at, anton.ivanov@cambridgegreys.com,
	linux-um@lists.infradead.org
Cc: Bhawanpreet.Lakha@amd.com
Subject: Re: [PATCH] um: Allow multiple symbol definitions for GCOV builds
Date: Tue, 21 Jul 2026 16:23:51 -0600	[thread overview]
Message-ID: <75f2f98c-78df-46df-9961-6ddf2870d044@amd.com> (raw)
In-Reply-To: <743d1be771381c86c7f264810d88876976cc508f.camel@sipsolutions.net>



On 7/21/26 15:58, Johannes Berg wrote:
> On Wed, 2026-07-08 at 16:40 -0600, Alex Hung wrote:
>> GCOV-enabled UML builds link GCC's libgcov into the final vmlinux
>> image. libgcov provides helper symbols such as mangle_path(), which
>> collide with kernel symbols of the same name (for example the one in
>> fs/seq_file.o). This makes the link fail:
>>
>>    ld: libgcov.a(_gcov.o): in function `mangle_path':
>>    multiple definition of `mangle_path';
>>    fs/seq_file.o: first defined here
>>
>> Pass --allow-multiple-definition to the linker when CONFIG_GCOV is set
>> so the final UML link succeeds while keeping the kernel-provided
>> definition.
>>
> 
> I cannot see how that would possibly result in correct behaviour (beyond
> being able to link)??


Hi Johannes,

Good point. --allow-multiple-definition silences the linker error, but 
picking kernel or libgcov's mangle_path() will break the other at runtime.

I saw your previous patch 
(https://lkml.iu.edu/hypermail/linux/kernel/2103.1/06604.html) to rename 
mangle_path() to seq_mangle_path(). How about reviving it to avoid name 
conflicts instead?

Alex

> 
> johannes



  reply	other threads:[~2026-07-21 22:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-08 22:40 [PATCH] um: Allow multiple symbol definitions for GCOV builds Alex Hung
2026-07-21 21:58 ` Johannes Berg
2026-07-21 22:23   ` Alex Hung [this message]
2026-07-22 14:02     ` Johannes Berg
2026-07-22 16:09       ` Alex Hung
2026-07-22 16:14         ` Johannes Berg
2026-07-24  0:44           ` Alex Hung
2026-07-24  6:42             ` 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=75f2f98c-78df-46df-9961-6ddf2870d044@amd.com \
    --to=alex.hung@amd.com \
    --cc=Bhawanpreet.Lakha@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