Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lld] Add cet-report and bti-report flags
Implement cet-report as supported in binutils. bti-report has the same behaviour for AArch64-BTI. Fixes #44828 Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D113901
- Loading branch information
1 parent
dd073e0
commit 2b4e605
Showing
7 changed files
with
124 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
# REQUIRES: x86 | ||
# RUN: llvm-mc --triple=x86_64-pc-linux --filetype=obj -o %t.o %s | ||
# RUN: not ld.lld -z pac-plt -z force-bti %t.o -o /dev/null 2>&1 | FileCheck %s | ||
# RUN: not ld.lld -z pac-plt -z force-bti -z bti-report=error %t.o -o /dev/null 2>&1 | FileCheck %s | ||
# | ||
## Check that we error if -z pac-plt and -z force-bti are used when target is not | ||
## Check that we error if -z pac-plt, -z force-bti and -z bti-report=error are used when target is not | ||
## aarch64 | ||
|
||
# CHECK: error: -z pac-plt only supported on AArch64 | ||
# CHECK-NEXT: error: -z force-bti only supported on AArch64 | ||
# CHECK-NEXT: error: -z bti-report only supported on AArch64 | ||
|
||
# RUN: not ld.lld -z bti-report=something %t.o -o /dev/null 2>&1 | \ | ||
# RUN: FileCheck --check-prefix=REPORT_INVALID %s | ||
# REPORT_INVALID: error: -z bti-report= parameter something is not recognized | ||
# REPORT_INVALID-EMPTY: | ||
|
||
.globl start | ||
start: ret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters