14:23:37 this is a bit of an odd question... but would there be an easy way with dis(1) or such to scan an ELF object to see if it contains AVX2 or AVX512 instructions, etc? 14:36:27 I remember when I palyed with sun cc it added some flags to the elf object 14:36:39 root@ntp:~# file /zones/news/root/usr/rusnet/sbin/ircd 14:36:39 /zones/news/root/usr/rusnet/sbin/ircd: ELF 64-bit LSB executable, x86-64, version 1 (Solaris), dynamically linked, interpreter /usr/lib/amd64/ld.so.1, not stripped, uses CMOV SSE SSE2 14:37:32 that "uses xxx" is the flags 14:38:28 unfortunately, gcc does not do it 20:13:14 still a dream to patch gas to do that properly 20:13:27 but I don't know we have anything that will scan except grep and knowing which instructions do what 20:18:42 and of course, many programs want the information studio adds stripped out since it prevents them from running on CPUs without those features, since it doesn't detect if you're checking the CPUID and only using them on those CPUs with fallbacks for CPUs without the features 20:19:54 Studio assumed everyone followed the old Solaris model of having processor-specific loadable modules for such things, not statically linking them into the main program 20:21:26 (Solaris ld added a "-z discap" option for the linker to disassemble & detect extension usage, but not until after the source was closed, so illumos didn't get to inherit it) 20:37:35 not hard to implement, along the lines of what I said above 20:37:43 tedious though 20:39:13 if you could use the dis tables in some more appropriate structure, you could probably even do it fast, except on x86 20:51:50 would probably be "fast enough" on x86