From 9b4d092de2611594ed654c4c0def30675ff3a102 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 10 Mar 2020 04:34:46 -0700 Subject: [PATCH] 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 which can be included in assembly codes to generate CET maker when compiling with -fcf-protection. --- icu4c/source/tools/toolutil/pkg_genc.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/icu4c/source/tools/toolutil/pkg_genc.cpp b/icu4c/source/tools/toolutil/pkg_genc.cpp index a4b6d7aa931..21996434d3a 100644 --- a/icu4c/source/tools/toolutil/pkg_genc.cpp +++ b/icu4c/source/tools/toolutil/pkg_genc.cpp @@ -131,6 +131,9 @@ static const struct AssemblyType { {"gcc", ".globl %s\n" "\t.section .note.GNU-stack,\"\",%%progbits\n" + "#ifdef __CET__\n" + "# include \n" + "#endif\n" "\t.section .rodata\n" "\t.balign 16\n" "#ifdef U_HIDE_DATA_SYMBOL\n" -- 2.40.0