[lld] [lld][ELF] Use the containing symbol, not the referenced symbol, for undefined symbol errors. (PR #70800)

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 31 10:23:31 PDT 2023


================
@@ -693,6 +693,34 @@ static const Symbol *getAlternativeSpelling(const Undefined &sym,
   return nullptr;
 }
 
+static Symbol &
+getSymAtOffset(InputSectionBase &sec, uint64_t off, Symbol &sym) {
----------------
smithp35 wrote:

Would getSymContainingOffset() be a better name, as we're looking for the symbol with off in the range [sym->off,, sym->off + sym->size) .  

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


More information about the llvm-commits mailing list