[PATCH] um: Allow multiple symbol definitions for GCOV builds

Johannes Berg johannes at sipsolutions.net
Tue Jul 21 14:58:37 PDT 2026


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)??

johannes



More information about the linux-um mailing list