[PATCH] D104164: Remove __llvm_mipmap section in llvm-strip
Ellis Hoag via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 11 17:31:39 PDT 2021
ellis created this revision.
Herald added a subscriber: emaste.
Herald added a reviewer: alexshap.
Herald added a reviewer: rupprecht.
Herald added a reviewer: jhenderson.
ellis requested review of this revision.
Herald added subscribers: llvm-commits, MaskRay.
Herald added a project: LLVM.
The `__llvm_mipmap` section should be considered a debug section because it provides no use at runtime. The `llvm-strip` tool should remove that section.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D104164
Files:
llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp
Index: llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp
===================================================================
--- llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp
+++ llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp
@@ -55,7 +55,8 @@
static bool isDebugSection(const SectionBase &Sec) {
return StringRef(Sec.Name).startswith(".debug") ||
- StringRef(Sec.Name).startswith(".zdebug") || Sec.Name == ".gdb_index";
+ StringRef(Sec.Name).startswith(".zdebug") ||
+ Sec.Name == ".gdb_index" || Sec.Name == "__llvm_mipmap";
}
static bool isDWOSection(const SectionBase &Sec) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104164.351605.patch
Type: text/x-patch
Size: 600 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210612/c956b32f/attachment.bin>
More information about the llvm-commits
mailing list