[lld] [llvm] [LLD][ELF][AArch64] Add support for SHF_AARCH64_PURECODE ELF section flag (3/3) (PR #125689)
Peter Smith via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 4 07:04:51 PST 2025
=?utf-8?q?Csan=C3=A1d_Hajd=C3=BA?= <csanad.hajdu at arm.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/125689 at github.com>
================
@@ -161,8 +162,11 @@ void OutputSection::commitSection(InputSection *isec) {
}
isec->parent = this;
- uint64_t andMask =
- ctx.arg.emachine == EM_ARM ? (uint64_t)SHF_ARM_PURECODE : 0;
+ uint64_t andMask = 0;
+ if (ctx.arg.emachine == EM_ARM)
----------------
smithp35 wrote:
We could rewrite as
```
if (ctx.arg.emachine == EM_ARM || ctx.arg.emachine == EM_AARCH64)
andMask |= (uint64_t)SHF_ARM_PURECODE;
```
https://github.com/llvm/llvm-project/pull/125689
More information about the llvm-commits
mailing list