[PATCH] D72344: [LLD][ELF][ARM][AArch64] Only round up ThunkSection Size when large OS.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 14 01:33:05 PST 2020
grimar added inline comments.
================
Comment at: lld/ELF/SyntheticSections.cpp:3387
+ // a call to assignAddresses().
+ roundUpSizeForErrata = true;
}
----------------
does the following look better?
```
roundUpSizeForErrata = (config->fixCortexA53Errata843419 || config->fixCortexA8) &&
os->size >= target->getThunkSectionSpacing();
```
But, basing on the comment which says "os->size is stable" (I've not debug the code, sorry),
can't you just get rid of `roundUpSizeForErrata` and do the following?
```
size_t ThunkSection::getSize() const {
if ((config->fixCortexA53Errata843419 || config->fixCortexA8) &&
this->parent->size >= target->getThunkSectionSpacing())
return alignTo(size, 4096);
return size;
}
```
================
Comment at: lld/ELF/SyntheticSections.h:1058
size_t size = 0;
+ bool roundUpSizeForErrata = false;
};
----------------
This needs a comment probably.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72344/new/
https://reviews.llvm.org/D72344
More information about the llvm-commits
mailing list