forked from OSchip/llvm-project
[ELF] - Added additional comments on top of r292789 (D29021)
It was requested during post commit review. llvm-svn: 292903
This commit is contained in:
parent
200ead56c6
commit
e3c2051d27
|
@ -237,6 +237,10 @@ template <class RelTy>
|
|||
void InputSection<ELFT>::copyRelocations(uint8_t *Buf, ArrayRef<RelTy> Rels) {
|
||||
InputSectionBase<ELFT> *RelocatedSection = getRelocatedSection();
|
||||
|
||||
// Loop is slow and have complexity O(N*M), where N - amount of
|
||||
// relocations and M - amount of symbols in symbol table.
|
||||
// That happens because getSymbolIndex(...) call below performs
|
||||
// simple linear search.
|
||||
for (const RelTy &Rel : Rels) {
|
||||
uint32_t Type = Rel.getType(Config->Mips64EL);
|
||||
SymbolBody &Body = this->File->getRelocTargetSym(Rel);
|
||||
|
|
Loading…
Reference in New Issue