[llvm] [llvm-readobj][AArch64][ELF][PAC] Support ELF AUTH constants (PR #72713)

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 12 01:54:23 PST 2023


================
@@ -1643,6 +1646,11 @@ enum {
   NT_ANDROID_TYPE_MEMTAG = 4,
 };
 
+// ARM note types
+enum {
+  NT_ARM_TYPE_PAUTH_ABI_TAG = 1,
----------------
smithp35 wrote:

Just to make sure I've got this right:
The link above is for GNU program properties:
https://github.com/ARM-software/abi-aa/blob/main/pauthabielf64/pauthabielf64.rst#19appendix-alternative-elf-marking-using-gnu-program-properties

It defines an additional program property on top of the existing .note.GNU.property defined in the Linux ABI extensions https://raw.githubusercontent.com/wiki/hjl-tools/linux-abi/linux-abi-draft.pdf that already has its own `NT_GNU_PROPERTY_TYPE_0` 

There is a part here which defines .note.AARCH64-PAUTH-ABI-tag which I think is where an additional `NT_ARM_TYPE_PAUTH_ABI_TAG` would make sense.
https://github.com/ARM-software/abi-aa/blob/main/pauthabielf64/pauthabielf64.rst#141default-marking-schema

Have I got that right?

In any case please can you raise an issue on the AArch64 ABI for that https://github.com/ARM-software/abi-aa so it can be addressed there. I'll also need to update the document to make it compatible with some forthcoming changes in the ABI to do with ELF marking. It is unfortunate that this will land too late for your timescale.

Essentially these pull-requests:
* https://github.com/ARM-software/abi-aa/pull/230 build attributes for relocatable objects
* https://github.com/ARM-software/abi-aa/pull/229 rationale for GNU properties in executable shared libraries

None have been merged yet, but pending more review comments there is a consensus within Arm that we'll be using build attributes (like 32-bit Arm) for ELF metadata in relocatable objects and for SysvAbi platforms such as Linux we'll be using .note.GNU.properties as our reference ELF marking scheme for executables and shared-libraries.

I expect that when the PAuthABI specification comes out of Alpha it will need to be updated, most likely to make the current Alternative ELF marking will be the reference marking, and the .note.AARCH64-PAUTH-ABI-tag will become the alternative. I've already defined build attibutes for PAuthABI that match the existing implementation.





 





https://github.com/llvm/llvm-project/pull/72713


More information about the llvm-commits mailing list