[PATCH] D38681: [LLD] [COFF] Don't error out on relocations to discarded sections in .eh_frame

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 9 23:05:44 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL315273: [COFF] Don't error out on relocations to discarded sections in .eh_frame (authored by mstorsjo).

Changed prior to commit:
  https://reviews.llvm.org/D38681?vs=118265&id=118317#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D38681

Files:
  lld/trunk/COFF/Chunks.h
  lld/trunk/test/COFF/reloc-discarded-dwarf.s


Index: lld/trunk/test/COFF/reloc-discarded-dwarf.s
===================================================================
--- lld/trunk/test/COFF/reloc-discarded-dwarf.s
+++ lld/trunk/test/COFF/reloc-discarded-dwarf.s
@@ -13,3 +13,5 @@
 
 	.section	.debug_info,"dr"
 	.quad	f
+	.section	.eh_frame,"dr"
+	.quad	f
Index: lld/trunk/COFF/Chunks.h
===================================================================
--- lld/trunk/COFF/Chunks.h
+++ lld/trunk/COFF/Chunks.h
@@ -186,8 +186,10 @@
     return SectionName == ".debug" || SectionName.startswith(".debug$");
   }
 
-  // True if this is a DWARF debug info chunk.
-  bool isDWARF() const { return SectionName.startswith(".debug_"); }
+  // True if this is a DWARF debug info or exception handling chunk.
+  bool isDWARF() const {
+    return SectionName.startswith(".debug_") || SectionName == ".eh_frame";
+  }
 
   // Allow iteration over the bodies of this chunk's relocated symbols.
   llvm::iterator_range<symbol_iterator> symbols() const {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38681.118317.patch
Type: text/x-patch
Size: 996 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171010/fcff45ca/attachment.bin>


More information about the llvm-commits mailing list