[lld] [ELF] Support NOCROSSREFS and NOCROSSERFS_TO (PR #98773)
Peter Smith via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 16 08:27:06 PDT 2024
================
@@ -2367,7 +2367,63 @@ void elf::hexagonTLSSymbolUpdate(ArrayRef<OutputSection *> outputSections) {
});
}
+static bool matchesRefTo(const NoCrossRefCommand &cmd, StringRef osec) {
+ if (cmd.toFirst)
+ return cmd.outputSections[0] == osec;
+ return llvm::is_contained(cmd.outputSections, osec);
+}
+
+template <class ELFT, class Rels>
+static void scanCrossRefs(const NoCrossRefCommand &cmd, OutputSection *osec,
+ InputSection *sec, Rels rels) {
----------------
smithp35 wrote:
For a NoCrossRefCommand cmd with `toFirst == true` can we early exit if osec == cmd.outputSections[0]?
This would be the case where we search the relocations from `tosection`.
https://github.com/llvm/llvm-project/pull/98773
More information about the llvm-commits
mailing list