[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 13:26:45 PDT 2017
mstorsjo updated this revision to Diff 118265.
mstorsjo added a comment.
Changed the section name comparison to `==`.
https://reviews.llvm.org/D38681
Files:
COFF/Chunks.h
test/COFF/reloc-discarded-dwarf.s
Index: test/COFF/reloc-discarded-dwarf.s
===================================================================
--- test/COFF/reloc-discarded-dwarf.s
+++ test/COFF/reloc-discarded-dwarf.s
@@ -13,3 +13,5 @@
.section .debug_info,"dr"
.quad f
+ .section .eh_frame,"dr"
+ .quad f
Index: COFF/Chunks.h
===================================================================
--- COFF/Chunks.h
+++ 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.118265.patch
Type: text/x-patch
Size: 936 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171009/b0b5f469/attachment.bin>
More information about the llvm-commits
mailing list