[PATCH] D34650: [COFF] Allow debug info to relocate against discarded symbols

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 27 15:02:26 PDT 2017


ruiu added inline comments.


================
Comment at: lld/COFF/Chunks.cpp:56-66
+static void applySecRel(const SectionChunk *Sec, uint8_t *Off,
+                        OutputSection *OS, uint64_t S) {
+  if (!OS) {
+    if (Sec->isCodeView())
+      return;
+    fatal("SECREL relocation cannot be applied to absolute symbols");
+  }
----------------
Ah, this is much more elegant than I was thinking. Good job!


================
Comment at: lld/COFF/MarkLive.cpp:57
+    // This can happen if the input object files have relocations against
+    // discarded sections. This is invalid input, but it is a common error.
+    if (SC->isDiscarded())
----------------
... a common error in debug sections?


https://reviews.llvm.org/D34650





More information about the llvm-commits mailing list