forked from OSchip/llvm-project
parent
c49bdd6d5d
commit
0faa53aaab
|
@ -661,11 +661,9 @@ template <class ELFT> void InputSection::writeTo(uint8_t *Buf) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copy section contents from source object file to output file.
|
// Copy section contents from source object file to output file
|
||||||
ArrayRef<uint8_t> Data = this->Data;
|
// and then apply relocations.
|
||||||
memcpy(Buf + OutSecOff, Data.data(), Data.size());
|
memcpy(Buf + OutSecOff, Data.data(), Data.size());
|
||||||
|
|
||||||
// Iterate over all relocation sections that apply to this section.
|
|
||||||
uint8_t *BufEnd = Buf + OutSecOff + Data.size();
|
uint8_t *BufEnd = Buf + OutSecOff + Data.size();
|
||||||
this->relocate<ELFT>(Buf, BufEnd);
|
this->relocate<ELFT>(Buf, BufEnd);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue