* Daniel P. Berrangé: > On Wed, Jun 12, 2024 at 09:59:25AM -0400, Stephen Gallagher wrote: >> OK, that's a situation that will lead to annoying and unresolvable bug >> reports. Would it be possible to put something in place that would >> check processor capabilities early in execution before hitting any of >> the affected instructions? > > Not trivial as a bunch of code executes from ELF constructors before > main() starts. Actually, you can put this into a C file that gets linked into the executable: asm ("\ .pushsection \".note.gnu.property\",\"a\",@note\n\ .p2align 3\n\ .long 4, 16, 5\n\ .asciz \"GNU\"\n\ .p2align 3\n\ .long 0xc0008002, 4, 3\n\ .p2align 3\n\ .popsection"); It marks the binary as requiring x86-64-v2. It will work only on x86-64, so it has to be made conditional on architecture. The glibc dynamic linker currently prints, “CPU ISA level is lower than required“ if the CPU requirement cannot be satisfied. I think it's still better than a crash, but maybe the wording could be improved (and some diagnostic information included). Thanks, Florian -- _______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue