Skip to content

Commit

Permalink
"Address John Brawn's review comment on procedure push/pop operation
Browse files Browse the repository at this point in the history
This commit will be squashed before merging.
  • Loading branch information
smithp35 committed Nov 27, 2023
1 parent 6e7ac1a commit 38336c3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions sysvabi64/sysvabi64.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1653,10 +1653,12 @@ executable sections are compatible with the Guarded control stack
(GCS) mechanism. Minimum requirements for setting this feature bit
include:

* The number of ``procedure return address push operations`` and the
number of ``procedure return address pop operations`` are balanced
on program exit. This means that ``procedure return`` instructions
are only used for function returns, and not as an indirect branch.
* Each function that is called using a BL instruction (or other
instruction that is a GCS ``procedure return address push
operation``) returns using a RET instruction (or other instruction
that is a GCS ``procedure return address pop operation``). This
means that RET instructions are only used for function returns, and
never as an indirect branch.

* Any functions used by the program that manipulate the stack such as
``setjmp`` and ``longjmp``, must be aware of GCS.
Expand Down

0 comments on commit 38336c3

Please sign in to comment.