Re: [PATCH] um: Allow multiple symbol definitions for GCOV builds
Alex Hung <[email protected]> Tue, 21 Jul 2026 16:23:51 -0600
| Newsgroups | gmane.linux.uml.devel |
|---|---|
| Message-ID | <[email protected]> |
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