Initial forward-edge CFI implementation (#3693)
* Initial forward-edge CFI implementation Give the user the option to start all basic blocks that are targets of indirect branches with the BTI instruction introduced by the Branch Target Identification extension to the Arm instruction set architecture. Copyright (c) 2022, Arm Limited. * Refactor `from_artifacts` to avoid second `make_executable` (#1) This involves "parsing" twice but this is parsing just the header of an ELF file so it's not a very intensive operation and should be ok to do twice. * Address the code review feedback Copyright (c) 2022, Arm Limited. Co-authored-by: Alex Crichton <alex@alexcrichton.com>
This commit is contained in:
@@ -880,6 +880,11 @@
|
||||
;; supported.
|
||||
(Xpaclri)
|
||||
|
||||
;; Branch target identification; equivalent to a no-op if Branch Target
|
||||
;; Identification (FEAT_BTI) is not supported.
|
||||
(Bti
|
||||
(targets BranchTargetType))
|
||||
|
||||
;; Marker, no-op in generated code: SP "virtual offset" is adjusted. This
|
||||
;; controls how AMode::NominalSPOffset args are lowered.
|
||||
(VirtualSPOffsetAdj
|
||||
@@ -1568,6 +1573,15 @@
|
||||
(B)
|
||||
))
|
||||
|
||||
;; Branch target types
|
||||
(type BranchTargetType
|
||||
(enum
|
||||
(None)
|
||||
(C)
|
||||
(J)
|
||||
(JC)
|
||||
))
|
||||
|
||||
;; Extractors for target features ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(decl pure sign_return_address_disabled () Unit)
|
||||
(extern constructor sign_return_address_disabled sign_return_address_disabled)
|
||||
|
||||
Reference in New Issue
Block a user