https://github.com/felixkellenbenz updated 
https://github.com/llvm/llvm-project/pull/78919

>From bf376afe7bd69fd25a006890b2910f2fd32c191b Mon Sep 17 00:00:00 2001
From: Felix Kellenbenz <fe.kellenbenz.compu...@outlook.de>
Date: Mon, 22 Jan 2024 00:49:21 +0100
Subject: [PATCH] Make llvm-strip not eat the .gnu_debuglink section

---
 llvm/lib/ObjCopy/ELF/ELFObjcopy.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/llvm/lib/ObjCopy/ELF/ELFObjcopy.cpp 
b/llvm/lib/ObjCopy/ELF/ELFObjcopy.cpp
index daf03810fd7bff..b6d77d17bae36c 100644
--- a/llvm/lib/ObjCopy/ELF/ELFObjcopy.cpp
+++ b/llvm/lib/ObjCopy/ELF/ELFObjcopy.cpp
@@ -450,6 +450,8 @@ static Error replaceAndRemoveSections(const CommonConfig 
&Config,
         return false;
       if (StringRef(Sec.Name).starts_with(".gnu.warning"))
         return false;
+      if (StringRef(Sec.Name).starts_with(".gnu_debuglink"))
+        return false;
       // We keep the .ARM.attribute section to maintain compatibility
       // with Debian derived distributions. This is a bug in their
       // patchset as documented here:

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to