mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 21:53:12 +08:00
[ELF] - Reset output section size when assigning offsets.
In many places we reset Size to 0 before calling assignOffsets()
manually. Sometimes we don't do that.
It looks we can just always do that inside.
Previous code had:
template <class ELFT> void OutputSection::assignOffsets() {
uint64_t Off = Size;
And tests feels fine with Off = 0.
I think Off = Size make no sence.
Differential revision: https://reviews.llvm.org/D30463
llvm-svn: 296609
This commit is contained in:
@@ -1025,7 +1025,6 @@ static void finalizeSynthetic(const std::vector<SyntheticSection *> &Sections) {
|
||||
for (SyntheticSection *SS : Sections)
|
||||
if (SS && SS->OutSec && !SS->empty()) {
|
||||
SS->finalizeContents();
|
||||
SS->OutSec->Size = 0;
|
||||
SS->OutSec->template assignOffsets<ELFT>();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user