[lld] [lld] Sort code section chunks by range types on Arm64EC targets. (PR #69099)
Jacek Caban via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 16 05:00:19 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;
----------------
cjacek wrote:
You're right, I will move it to separated commit (and MR? please correct me if that's not needed). The motivation for a new helper is to avoid duplicating it `sortECChunks` and future Arm64EC changes will need more code section-only handling.
https://github.com/llvm/llvm-project/pull/69099
More information about the llvm-commits
mailing list