Skip to content

Add shadow stack support.

loqs requested to merge loqs/gmp:SHSTK into main

Add -Wl,-z,shstk to LDFLAGS to have the linker generate GNU_PROPERTY_X86_FEATURE_1_SHSTK in section to indicate compatibility with Shadow Stack.

There was an effort to get CET (Shadow Stack plus Indirect Branch Tracking) support accepted upstream but it was never accepted. The scale of the changes primarily required for IBT may have been the cause of upstream not accepting it. Shadow Stack support only requires marking the binary. If changing the linker flags is not acceptable I produce a cut down patch that adds the markings.

Edited by loqs

Merge request reports