[lld] lld: add support for NOCROSSREFS(_TO) (PR #95714)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 12 16:32:03 PDT 2024


================
@@ -2358,3 +2358,45 @@ template void elf::scanRelocations<ELF32LE>();
 template void elf::scanRelocations<ELF32BE>();
 template void elf::scanRelocations<ELF64LE>();
 template void elf::scanRelocations<ELF64BE>();
+
+static void forEachAllocInputSectionDescription(
+    ArrayRef<OutputSection *> outputSections,
+    llvm::function_ref<void(OutputSection *, InputSectionDescription *)> fn) {
+  for (OutputSection *os : outputSections) {
+    if (!(os->flags & SHF_ALLOC))
----------------
MaskRay wrote:

GNU ld reports violations due to non-SHF_ALLOC sections. I'll fix it in my branch.

https://github.com/llvm/llvm-project/pull/95714


More information about the llvm-commits mailing list