[PATCH] Linker: Replace overridden subprograms

Rafael EspĂ­ndola rafael.espindola at gmail.com
Tue Dec 16 09:48:59 PST 2014


> It's possible to put DWARF subprogram definitions for linkonce_odr functions
> into comdat groups so they are dropped along with the linkonce_odr function,
> but Clang (& I don't think GCC by default) does that (there's some overhead
> to that representational choice, etc). But yes, it can be done. I think
> today, for both GCC and Clang, you'd end up with two subprogram definitions
> (one in each DWARF compile unit) each pointing to the same high_pc/low_pc to
> describe the function.

I thought this was part of a special case for dwarf in linkers (and
the missing feature why lld produced binaries are much larger in -g
builds).

> (but yeah, vaguely sounds like what you're suggesting would make sense - I
> haven't looked at the initial proposed patch yet, though)

Cheers,
Rafael



More information about the llvm-commits mailing list