[lld] [lld][ELF] Add --debug-names to create merged .debug_names. (PR #86508)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 16 15:08:15 PDT 2024


================
@@ -858,6 +858,10 @@ class DebugNamesBaseSection : public SyntheticSection {
     // Pointer to the .debug_info section that contains compile units, used to
     // compute the relocated CU offsets.
     InputSection *infoSec;
+    // This initially holds section offsets, which may not be consecutive if
+    // there are multiple name indices in an input .debug_names section. After
----------------
dwblaikie wrote:

Not sure I'm following this comment - these offsets would never be consecutive (like, they'd never be 0,1,2 - because debug_info sections are bigger than a byte) but they'd also not necessarily be increasing - the cu offset list could be in any order from the input file... 

And I'm not sure what that has to do with the existence/absence of multiple name indices in an input .debug_names section?

This list contains all the offsets from a single .debug_names table, yeah? Or from all tables in a single .debug_names section? In any case, those both seem like they could be in quite arbitrary orders?

https://github.com/llvm/llvm-project/pull/86508


More information about the llvm-commits mailing list