Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.

Unable to remove hwcaps_2

Skip to first unread message

Nov 9, 2018, 5:42:34 PM11/9/18
Hi Everyone,

I'm having trouble removing hwcaps_2 from an executable and shared object. It results in the following:

$ ./cryptest.exe v cryptest.exe: fatal: cryptest.exe:
hardware capability (CA_SUNW_HW_2) unsupported: 0x40 [ AVX2 ]

This particular machine lacks AVX2, but we guard the code path at runtime.

My mapfile looks like so:

$ cat cryptopp.mapfile
hwcap_1 = SSE SSE2 OVERRIDE;
hwcap_2 = V0x0;

I can't add OVERRIDE to hwcpas_2:

$ cat cryptopp.mapfile
hwcap_1 = SSE SSE2 OVERRIDE;
hwcap_2 = V0x0 OVERRIDE;

It results in:

ld: fatal: cryptopp.mapfile: 6: unknown segment attribute: override
make: *** [GNUmakefile:1089: cryptest.exe] Error 2

I am also aware of , but none of the techniques work for me.

How do I remove hwcaps_2 from the executable and shared library?

Thanks in advance.


We are a free/open source project. We [try to] support back to Solaris 9. The need for AVX2 is new due to a recent check-in. The project is located at


Here is the output from link:

$ CXX=/opt/developerstudio12.5/bin/CC make -j 5
/opt/developerstudio12.5/bin/CC -o cryptest.exe -DNDEBUG -g -xO3 -template=no%ex
tdef adhoc.o test.o bench1.o bench2.o bench3.o datatest.o dlltest.o fipsalgt.o v
alidat0.o validat1.o validat2.o validat3.o validat4.o validat5.o validat6.o vali
dat7.o validat8.o validat9.o validat10.o regtest1.o regtest2.o regtest3.o regtes
t4.o ./libcryptopp.a -xarch=sse2 -xarch=ssse3 -xarch=sse4_1 -xarch=sse4_2 -xarch
=aes -xarch=avx -xarch=avx2 -M cryptopp.mapfile -lnsl -lsocket


$ elfdump -H cryptest.exe

Capabilities Section: .SUNW_cap
Object Capabilities:
index tag value
[0] CA_SUNW_HW_2 0x40 [ AVX2 ]
[1] CA_SUNW_HW_1 0x1800 [ SSE2 SSE ]
0 new messages