[lld] [lld] Sort code section chunks by range types on Arm64EC targets. (PR #69099)
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 16 04:07:14 PDT 2023
================
@@ -1403,11 +1420,7 @@ void Writer::assignAddresses() {
// If /FUNCTIONPADMIN is used, functions are padded in order to create a
// hotpatchable image.
- const bool isCodeSection =
- (sec->header.Characteristics & IMAGE_SCN_CNT_CODE) &&
- (sec->header.Characteristics & IMAGE_SCN_MEM_READ) &&
- (sec->header.Characteristics & IMAGE_SCN_MEM_EXECUTE);
- uint32_t padding = isCodeSection ? config->functionPadMin : 0;
+ uint32_t padding = sec->isCodeSection() ? config->functionPadMin : 0;
----------------
mstorsjo wrote:
I don't quite see how this particular change is connected to the rest; isn't this bit just a separate individual NFC refactoring? Can you split it to a separate commit?
https://github.com/llvm/llvm-project/pull/69099
More information about the llvm-commits
mailing list