ARM-software / abi-aa

Application Binary Interface for the Arm® Architecture
Other
878 stars 173 forks source link

[PAuthABIELF64] Use .note.gnu.property section as ELF marking scheme. #240

Closed smithp35 closed 4 months ago

smithp35 commented 5 months ago

Make the alternative .note.gnu.property section the default ELF marking scheme for ELF executables and shared libraries. Preserve the original SHT_NOTE section as an alternative for legacy compatibility.

Tighten up the wording to restrict the property to just a pair of 64-bit words. This permits the program property to be described by a pair of build attributes which Arm plans to introduce for relocatable ELF object marking.

asl commented 5 months ago

Tagging @kovdan01

smithp35 commented 5 months ago

I've made an update that tries to extract the core parts of any ELF marking into a separate section. This permits multiple encodings of that same information.

I've written of the compatibility model as possible using the core information.

I expect I'll need several rounds of review to get this update right. I'm also aware I'll need to proofread all that I've written again as I wanted to get this update out before the end of the day.

asl commented 4 months ago

Just to note: the current implementation in LLVM is done according to this spec.

smithp35 commented 4 months ago

I'll set a review deadline for 12/05/2024, I'll merge unless there are any objections.

smithp35 commented 4 months ago

Squashing prior to rebase and merge.

kovdan01 commented 4 months ago

It looks like that after merging this into main, the rst preview on GitHub stopped working. I tried to find the root cause manually and by utils checkrst and rst2html - they found no issues. This script from GitHub repo also converts the file to html w/o issues https://github.com/github/markup/blob/master/lib/github/commands/rest2html. So, unfortunately I can't say what is the particular source of the issue, but the issue itself exists.

Having rst preview working is needed to provide links to particular parts of the document, for example, in code comments (via #part-name ending in url).

smithp35 commented 4 months ago

We are aware of the general issue (https://github.com/ARM-software/abi-aa/issues/236). Several other ABI documents are affected.

From our investigation on bisecting changes there is a maximum character limit for the RST preview that was introduced by Github some Months ago. We've reported to Github (mentioned in https://github.com/orgs/community/discussions/86715#discussioncomment-8155221). Github support have hinted that they have a solution coming soon, but we've no precise ETA of when that will be.