[llvm] [AArch64, ELF] Allow implicit $d/$x at section beginning (PR #99718)

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 13 08:42:52 PDT 2024


smithp35 wrote:

I don't think we need to use an object marking to do a compatibility check, while that is possible I don't think it is necessary in the majority of the cases.

What it does do is give us the chance to identify objects with the alternative marking scheme and unambiguously know that an executable section with no mapping symbols is either data or AArch64 code. This could help tools if the difference became important.

While I don't want to speculate too much over how to mark an object, I'm wondering if it is something you're willing to entertain?

As an aside; Arm's original ELF spec for its proprietary toolchain prior to the ABI in 2004 used to define a couple of ELF header flags:
* `EF_ARM_MAPSYMSFIRST` all mapping symbols form a subsection which is first in the static symbol table, all remaining symbols form a subsection. The first symbol in the symbol table is `$m` the value of which was the number of mapping symbols, permitting a consumer to skip to the first non-mapping symbol.
* `EF_ARM_SYMSARESORTED` symbols in a subsection are sorted in ascending address order.

These were rejected when the AArch32 ABI was published as specific to Arm's proprietary toolchain.

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


More information about the llvm-commits mailing list