[lld] [lld-macho] Fix invalid DWARF with --icf=safe_thunks (PR #111097)
    Kyungwoo Lee via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Oct  4 16:46:46 PDT 2024
    
    
  
================
@@ -1229,6 +1229,17 @@ void SymtabSection::emitStabs() {
       if (defined->isAbsolute())
         continue;
 
+      // Never generate a STABS entry for a symbol that has been ICF'ed using a
+      // thunk - just like we do for fully ICF'ed functions. Otherwise we end up
+      // generating invalid DWARF as dsymutil will think the entire function
+      // body is at that location, when in actuality only the thunk will be
----------------
kyulee-com wrote:
```suggestion
      // body is at that location, when, in reality, only the thunk is
```
https://github.com/llvm/llvm-project/pull/111097
    
    
More information about the llvm-commits
mailing list