[PATCH] D113466: [ELF] Improve sh_info=0 and sh_info>=num_sections diagnostic for SHT_REL/SHT_RELA

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 9 00:20:16 PST 2021


MaskRay added inline comments.


================
Comment at: lld/ELF/InputFiles.cpp:846
 
-  // Strictly speaking, a relocation section must be included in the
-  // group of the section it relocates. However, LLVM 3.3 and earlier
-  // would fail to do so, so we gracefully handle that case.
-  if (target == &InputSection::discarded)
-    return nullptr;
+    // Strictly speaking, a relocation section must be included in the
+    // group of the section it relocates. However, LLVM 3.3 and earlier
----------------
The hack was from D16898.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113466/new/

https://reviews.llvm.org/D113466



More information about the llvm-commits mailing list