[PATCH] D105210: [lld-macho] Ignore debug symbols for now.

Vy Nguyen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 30 09:51:40 PDT 2021


oontvoo created this revision.
Herald added a reviewer: int3.
Herald added a reviewer: gkm.
Herald added a project: lld-macho.
Herald added a reviewer: lld-macho.
oontvoo requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Details: see https://bugs.llvm.org/show_bug.cgi?id=50812


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D105210

Files:
  lld/MachO/InputFiles.cpp


Index: lld/MachO/InputFiles.cpp
===================================================================
--- lld/MachO/InputFiles.cpp
+++ lld/MachO/InputFiles.cpp
@@ -581,6 +581,12 @@
   symbols.resize(nList.size());
   for (uint32_t i = 0; i < nList.size(); ++i) {
     const NList &sym = nList[i];
+
+    // Ignore debug symbols for now.
+    // FIXME: may need special handling.
+    if (sym.n_type & N_STAB)
+      continue;
+
     StringRef name = strtab + sym.n_strx;
     if ((sym.n_type & N_TYPE) == N_SECT) {
       SubsectionMap &subsecMap = subsections[sym.n_sect - 1];


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105210.355605.patch
Type: text/x-patch
Size: 576 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210630/f524d1b3/attachment.bin>


More information about the llvm-commits mailing list