[lld] [llvm] [LLD][ELF][AArch64] Add support for SHF_AARCH64_PURECODE ELF section flag (3/3) (PR #125689)
Csanád Hajdú via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 4 07:38:08 PST 2025
================
@@ -2844,6 +2848,40 @@ static void readSecurityNotes(Ctx &ctx) {
ctx.arg.andFeatures &= ~GNU_PROPERTY_AARCH64_FEATURE_1_GCS;
}
+static void checkExecuteOnly(Ctx &ctx) {
+ if (ctx.arg.emachine != EM_AARCH64)
+ return;
+
+ auto report = [&](StringRef config) -> ELFSyncStream {
+ if (config == "error")
+ return {ctx, DiagLevel::Err};
+ if (config == "warning")
+ return {ctx, DiagLevel::Warn};
+ return {ctx, DiagLevel::None};
+ };
+ auto reportUnless = [&](StringRef config, bool cond) -> ELFSyncStream {
+ if (cond)
+ return {ctx, DiagLevel::None};
+ return report(config);
----------------
Il-Capitano wrote:
Good catch. I copied the structure from the other `-z *-report` checks above, where `report` is used elsewhere in that function. I'll remove it.
https://github.com/llvm/llvm-project/pull/125689
More information about the llvm-commits
mailing list