[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 02:27:52 PDT 2017
mstorsjo created this revision.
Herald added subscribers: JDevlieghere, aprantl.
This allows linking code with dwarf exception handling.
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
@@ -187,7 +187,10 @@
}
// True if this is a DWARF debug info chunk.
- bool isDWARF() const { return SectionName.startswith(".debug_"); }
+ bool isDWARF() const {
+ return SectionName.startswith(".debug_") ||
+ SectionName.startswith(".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.118189.patch
Type: text/x-patch
Size: 813 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171009/40ef5a6e/attachment.bin>
More information about the llvm-commits
mailing list