>> Has any consideration be given to perhaps creating a new MACHINE_ARCH for >> this, or somehow otherwise decorating the ELF files to indicate their >> exec-ability? > >I am under the impression that PAC was designed to be forewards >compatible, so older CPUs can execute code with this annotation. I don't >whether it works in practice though.
Yes. That's right. Even binaries compiled with "gcc -msign-return-address=all" work fine on ARMv8.0-v8.2 CPUs. This is because the "paciasp" and "autiasp" instructions are treated as "nop" on ARMv8.0-v8.2 CPUs. Therefore, I don't think it's necessary to add detailed attributes to the ELF header. So, even if we default the PAC option right now, we won't have any problems. But we might as well enable PAC by default after real ARMv8.3 hardware becomes available easily. (now tested on "qemu-system-aarch64 -cpu max") -- ryo shimizu