[PATCH] D78954: [LLD][ELF] Add isDebug flag to SectionBase.

Alexey Lapshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 27 15:39:43 PDT 2020


avl added a comment.

> Most links don't use --strip-debug or --strip-all, so isDebugSection in LinkerDriver::link is rarely called.



> Most links don't specify -r or --emit-relocs, so InputSection::copyRelocations is not called. In addition, isDebugInfo inside the function is called by edge cases which we have to suppress warnings for practical reasons, the cases are even fewer.



> I am hesitant to accept this patch, unless you can make further justification.

I intend to use it for D74169 <https://reviews.llvm.org/D74169>(where checking for debug section is used more frequently). If not for D74169 <https://reviews.llvm.org/D74169> then it would be suitable for any future checking of debug section(support of .debug_names?). This change costs nothing. It does not increase the size of SectionBase. Thus it seems to me it would be useful to do this patch even if it does not show noticeable performance impact right now.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78954/new/

https://reviews.llvm.org/D78954





More information about the llvm-commits mailing list