ICU-21019 x86: Add .note.gnu.property section for Intel CET

Intel Control-flow Enforcement Technology (CET):

https://software.intel.com/en-us/articles/intel-sdm

contains shadow stack (SHSTK) and indirect branch tracking (IBT).  When
CET is enabled, ELF object files must be marked with .note.gnu.property
section.  GCC provides <cet.h> which can be included in assembly codes
to generate CET maker when compiling with -fcf-protection.
This commit is contained in:
H.J. Lu 2020-03-10 04:34:46 -07:00 committed by Steven R. Loomis
parent 3f13312e8a
commit 9b4d092de2

View file

@ -131,6 +131,9 @@ static const struct AssemblyType {
{"gcc",
".globl %s\n"
"\t.section .note.GNU-stack,\"\",%%progbits\n"
"#ifdef __CET__\n"
"# include <cet.h>\n"
"#endif\n"
"\t.section .rodata\n"
"\t.balign 16\n"
"#ifdef U_HIDE_DATA_SYMBOL\n"