Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sysvabi64] Require PT_GNU_PROPERTY when program properties used. #301

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions sysvabi64/sysvabi64.rst
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,10 @@ Change History
| | | used by `PAuthABIELF64`_ and |
| | | `MemTagABIELF64`_. |
+------------+------------------------------+-------------------------------------------------------+
| 2024Q4 | 29\ :sup:`th` November 2024 | Require that ``PT_GNU_PROPERTY`` program header be |
| | | present in executables and shared-libraries if a |
| | | .note.gnu.property section is present. |
+------------+------------------------------+-------------------------------------------------------+

References
----------
Expand Down Expand Up @@ -1670,6 +1674,17 @@ include:
* Any functions used by the program that manipulate the stack such as
``setjmp`` and ``longjmp``, must be aware of GCS.

Program Properties and program headers
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

An executable or shared-library containing Program Properties must
have a ``PT_GNU_PROPERTY`` program header [LINUX_ABI_] to identify
the location of the program properties to the program loader.

The program header must be generated even if the
``.note.gnu.property`` is consolidated into another section of type
SHT_NOTE.

Tool Requirements for generating BTI instructions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down Expand Up @@ -1735,6 +1750,13 @@ calls to that location.
Program Loading
---------------

Locating GNU properties
^^^^^^^^^^^^^^^^^^^^^^^

A program loader may rely on the presence of a ``PT_GNU_PROPERTY``
program header to locate the ``.note.gnu.property`` section in an
executable or shared-object.

Process ``GNU_PROPERTY_AARCH64_FEATURE_1_BTI``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down