https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124237
Bug ID: 124237
Summary: aarch64: libitm is not marked with GCS when built with
-mbranch-protection=standard
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: libitm
Assignee: unassigned at gcc dot gnu.org
Reporter: ykhrustalev at gcc dot gnu.org
Target Milestone: ---
When "-mbranch-protection=standard" is enabled for target libraries, libitm is
not marked with GCS. Both BTI and PAC markings are present, but GCS is not:
```
$ readelf -n lib64/libitm.so
Properties: AArch64 feature: BTI, PAC
```
Compare with libatomic:
```
$ readelf -n lib64/libatomic.so
Properties: AArch64 feature: BTI, PAC, GCS
```
This can be fixed by adding a relevant GCS property to
libitm/config/aarch64/sjlj.S.