https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83910
Bug ID: 83910
Summary: Add --enable-cet-property
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: hjl.tools at gmail dot com
Blocks: 81652
Target Milestone: ---
Target: x86
CET is enabled by run-time loader only if all modules have CET property:
[hjl@gnu-tools-1 gcc]$ readelf -n crtbegin.o
Displaying notes found in: .note.gnu.property
Owner Data size Description
GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0
Properties: x86 feature: IBT, SHSTK
[hjl@gnu-tools-1 gcc]$
Linker will create CET property only if all input object files have CET
property. To create GCC run-time libraries with CET property, CET enabled
glibc must be used to build GCC. We should add --enable-cet-property to
GCC, which will pass "-z ibt -z shstk" to linker when creating target
run-time libraries. This GCC can then be used to build CET enabled glibc.
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81652
[Bug 81652] [meta-bug] -fcf-protection=full -mcet bugs