On Mon, Sep 28, 2020 at 05:46:08PM +0200, Jan Kratochvil wrote:
> A way out of this could be either to use comdat .debug_info etc.
sections
> (but that would result in quite large increase of *.o file sizes), or let
> the linker or a tool like DWZ discard or simplify such DIEs.
> I don't see how could you see at compile time that the linker will not
> choose the particular copy.
Another option is to use clang which should have such optimization implemented
soon:
https://whova.com/embedded/session/llvm_202010/1193947/
If you do it on the compiler side, you'll get a lot of those pesky partial
units you so hate on the lldb side.
Jakub