[lld] [LLD][ELF] Add `-z execute-only-report` that checks PURECODE section flags (PR #128883)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 28 23:42:27 PST 2025


=?utf-8?q?Csanád_Hajdú?= <csanad.hajdu at arm.com>,
=?utf-8?q?Csanád_Hajdú?= <csanad.hajdu at arm.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/128883 at github.com>


================
@@ -13,5 +13,15 @@
 # RUN: not ld.lld %t --toc-optimize -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR-TOC
 # ERR-TOC: error: --toc-optimize is only supported on PowerPC64 targets
 
+# RUN: not ld.lld %t -z execute-only-report=warning -o /dev/null 2>&1 | \
+# RUN:     FileCheck %s --check-prefix=ERR-EXECUTE-ONLY
+# RUN: not ld.lld %t -z execute-only-report=error -o /dev/null 2>&1 | \
+# RUN:     FileCheck %s --check-prefix=ERR-EXECUTE-ONLY
+# ERR-EXECUTE-ONLY: error: -z execute-only-report only supported on AArch64 and ARM
+
+# RUN: not ld.lld %t -z execute-only-report=foo -o /dev/null 2>&1 | \
+# RUN:     FileCheck %s --check-prefix=ERR-EXECUTE-ONLY-INVALID
+# ERR-EXECUTE-ONLY-INVALID: error: -z execute-only-report= parameter foo is not recognized
----------------
MaskRay wrote:

I just noticed that the error message is not conventional. It should be
`unknown -z execute-only-report= value: foo` to match a few other options.

I am updating it. Please then rebase.

https://github.com/llvm/llvm-project/pull/128883


More information about the llvm-commits mailing list