[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:25:07 PDT 2017


mstorsjo added inline comments.


================
Comment at: COFF/Chunks.h:192
+    return SectionName.startswith(".debug_") ||
+           SectionName.startswith(".eh_frame");
+  }
----------------
ruiu wrote:
> I wonder if you actually need `startswith`. Why don't you use `==`?
I remembered seeing section names like `.eh_frame$funcName` somewhere, but now I can't really find that (perhaps it even was in some tests on ELF), and linking succeeds with plain `==`. So I can change it to `==`, and I can see later if I ever need `startswith`.


https://reviews.llvm.org/D38681





More information about the llvm-commits mailing list