Re: Have compiler remove __fentry locations from overwritten weak functions

Peter Zijlstra
2024-10-15T08:52:57Z

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.