Re: Have compiler remove __fentry locations from overwritten weak functions

From: Peter Zijlstra
Date: Tue Oct 15 2024 - 04:53:06 EST


On Tue, Oct 15, 2024 at 10:01:49AM +0200, Peter Zijlstra wrote:

> > Would this be something that the compiler could do?
>
> Linker, this is link time. The linker would not only have to drop the
> (weak) symbol from the symbol table (which is all it really does), but
> it would now have to go and muck about with other sections.

Ah, one thing that might actually help is if instead of dropping the
weak symbol from the table, it would retain it but rename it -- add a
unique suffix or somesuch.

Then it becomes yet another unused symbol.