[lld] [lld][AArch64] Add support for GCS (PR #90732)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Thu May 9 23:43:47 PDT 2024


MaskRay wrote:

> > > > Thanks for the patch. Looks quite good.
> > > > I've a question about the alias: `-z gcs is the same as -z gcs=always.`
> > > > Is there a strong need for it? It's quite uncommon to have `-z` option aliases and I'd avoid if there is no compatibility concern.
> > > 
> > > 
> > > `-z gcs` is there to be consistent will all the other similar options to do with the GNU_PROPERTY bits, where there's a `-z thing` option which forces the GNU_PROPERTY_THING bit to be set.
> > 
> > 
> > Other options setting GNU_PROPERTY are quite different in names, `-z force-bti`, `-z force-ibt`. For `-z xxx` without `=`, there is typically a `-z noxxx`, but I don't think we want to add `-z nogcs`.
> 
> It looks like there's a mix:
> 
> * With `force-`: `force-bti`, `force-ibt`
> * Without `force-`: `pac-plt`, `shstk`
> 
> The current name is what I've agreed with the people working on the GNU support for this ([sourceware.org/git/?p=binutils-gdb.git;a=shortlog;h=refs/heads/users/ARM/gcs-binutils-gdb-master](https://sourceware.org/git/?p=binutils-gdb.git;a=shortlog;h=refs/heads/users/ARM/gcs-binutils-gdb-master), though that currently has `experimental-` in the option name which we've agreed should be removed), I'll ask them what they think about not having `-z gcs` mean the same as `-z gcs=always`.

Thanks for the additional context. Please forward my remark about the alias to them :)

The existence of an alias `-z gcs` could make people wonder whether it is `always` or `implicit`.

https://github.com/llvm/llvm-project/pull/90732


More information about the llvm-commits mailing list