Hello,
The attached is my attempt to enable PAC/BTI[1] support for AArch64. As
the Nettle assembly files only define leaf functions (i.e., no
subroutine calls with LR/SP save/restore), PAC is not applicable and
thus only BTI is enabled for now.
To test, I used the mock[2] environment with the fedora-40-aarch64
configuration:
$ mock -r fedora-40-aarch64 --init
<mock-chroot> sh-5.2# ./.bootstrap
<mock-chroot> sh-5.2# ./configure --disable-documentation CFLAGS="-mbranch-…
[View More]protection=standard"
<mock-chroot> sh-5.2# make -j$(nproc)
<mock-chroot> sh-5.2# readelf -n libnettle.so
Displaying notes found in: .note.gnu.property
Owner Data size Description
GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0
Properties: AArch64 feature: BTI, PAC
...
Regards,
Footnotes:
[1] https://wiki.debian.org/ToolChain/PACBTI
[2] https://fedoraproject.org/wiki/Using_Mock_to_test_package_builds
--
Daiki Ueno
[View Less]