Skip to content

Commit 955b180

Browse files
smithp35mmalcomson
authored andcommitted
Relax BTI PLT requirement in aaelf64
The ABI states that all PLT entries must start with BTI when the DT_AARCH64_BTI_PLT dynamic tag is present. This is too strict as the static linker can prove that some PLT entries are never indirectly called so do not need to start with a BTI. Both LLD and GNU ld do this. Relax the wording to bring the specification in line with implementations. #197
1 parent 03da0db commit 955b180

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

aaelf64/aaelf64.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1881,11 +1881,12 @@ Dynamic Linking
18811881
Custom PLTs
18821882
^^^^^^^^^^^^
18831883

1884-
- To support Branch Target Identification mechanism, in the presence of a
1885-
``GNU_PROPERTY_AARCH64_FEATURE_1_BTI`` all PLT entries generated
1886-
by the linker must have a BTI instruction as the first instruction. The
1887-
linker must add the ``DT_AARCH64_BTI_PLT`` (`AArch64 specific dynamic array tags`_) tag to
1888-
the dynamic section.
1884+
- To support Branch Target Identification mechanism, in the presence
1885+
of a ``GNU_PROPERTY_AARCH64_FEATURE_1_BTI`` all PLT entries
1886+
generated by the linker that can be called indirectly must have a
1887+
BTI instruction as the first instruction. The linker must add the
1888+
``DT_AARCH64_BTI_PLT`` (`AArch64 specific dynamic array tags`_) tag
1889+
to the dynamic section.
18891890

18901891
- To support Pointer Authentication, PLT entries generated
18911892
by the linker can have an authenticating instruction as the final

0 commit comments

Comments
 (0)