Skip to content

Commit 6e51650

Browse files
committed
Changes from last revision:
Remove the mention of SME support routines and __builtin_cpu_supports as there is no obligation that they use __aarch64_cpu_features. Instead say that the variable can only be placed in RELRO if it is only accessed by FMV resolvers. Otherwise, if used by compiler generated code or the runtime library then it requires constructor init and cannot be in RELRO.
1 parent 4fe9316 commit 6e51650

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

sysvabi64/sysvabi64.rst

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1716,23 +1716,19 @@ The variable may contain the following fields:
17161716
+-------------------+----------+
17171717

17181718
Implementing FMV using ``__aarch64_cpu_features`` is not required.
1719-
Accessing this variable from outside a FMV resolver function is
1720-
not well defined. The variable may be placed in the
1721-
`Relocation Read Only (RELRO)`_ program segment to prevent it
1722-
from being modified after the FMV resolvers have run. The
1723-
variable must be defined as DSO-local with its symbol visibility
1724-
set to ``STV_HIDDEN``.
1719+
Accessing this variable from outside a FMV resolver function is not
1720+
well defined. If the variable is only accessed by the FMV resolvers,
1721+
then it may be placed in the `Relocation Read Only (RELRO)`_ program
1722+
segment to prevent it from being modified after the FMV resolvers
1723+
have run. The variable must be defined as DSO-local with its symbol
1724+
visibility set to ``STV_HIDDEN``.
17251725

17261726
.. note::
17271727

1728-
Both the SME support routines (see AAPCS64_ for more information)
1729-
and the compiler built-in function ``__builtin_cpu_supports`` rely
1730-
on the ``__aarch64_cpu_features`` variable for detecting CPU features.
1731-
Therefore the runtime library must ensure that the variable is
1732-
initialized prior to their usage. FMV support is not required for
1733-
using the SME support routines or the ``__builtin_cpu_supports``
1734-
function. The ``__aarch64_cpu_features`` variable should not be
1735-
placed in ``RELRO`` if no FMV resolver has run.
1728+
The ``__aarch64_cpu_features`` variable may be used by the runtime
1729+
library or by compiler generated code besides FMV. In that case the
1730+
runtime library must ensure that the variable is initialized via a
1731+
constructor function and cannot be placed in the ``RELRO`` segment.
17361732

17371733
The ``__init_cpu_features_resolver`` function has the following
17381734
prototype:

0 commit comments

Comments
 (0)