Skip to content

Commit 78e3dc0

Browse files
sivan-shanimahesh-attarde
authored andcommitted
[LLD][Docs] Document -z gcs= option in the man page (llvm#146522)
Add documentation for the -z gcs= option to the LLD man page. This flag controls how the GCS bit is set in the output: - implicit (default): inferred from input objects - never: GCS bit is never set - always: GCS bit is always set Clarifies behavior for users and aligns the man page with existing functionality.
1 parent 15d1a6b commit 78e3dc0

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

lld/docs/ld.lld.1

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,13 @@ Specify how to report the missing GNU_PROPERTY_X86_FEATURE_1_IBT or GNU_PROPERTY
798798
.Cm none
799799
is the default, linker will not report the missing property otherwise will be reported as a warning or an error.
800800
.Pp
801+
.It Cm gcs-report Ns = Ns Ar [none|warning|error]
802+
Specify how to report missing
803+
.Cm GNU_PROPERTY_AARCH64_FEATURE_1_GCS
804+
property. GNU_PROPERTY_AARCH64_FEATURE_1_GCS indicates object file support for the Guarded Control Stack security feature.
805+
.Cm none
806+
is the default, linker will not report the missing property otherwise will be reported as a warning or an error.
807+
.Pp
801808
.It Cm dynamic-undefined-weak
802809
Make undefined weak symbols dynamic when the dynamic symbol table is present, if they are referenced from
803810
relocatable object files and not forced local by symbol visibility or versioning. Do not make them dynamic when
@@ -953,6 +960,17 @@ disallows overlap.
953960
.It Cm shstk
954961
x86 only, use shadow stack.
955962
.Pp
963+
.It Cm gcs Ns = Ns Ar [implicit|never|always]
964+
Specifies how the
965+
.Cm GNU_PROPERTY_AARCH64_FEATURE_1_GCS
966+
bit is set in the output ELF file. When set, it indicates support for the Guarded Control Stack (GCS) security feature.
967+
.Cm implicit
968+
(default) The GCS feature bit is set if all input relocatable files have a .note.gnu.property section containing the GNU_PROPERTY_AARCH64_FEATURE_1_GCS bit.
969+
.Cm never
970+
clears the GCS feature bit regardless of input relocatable files' markings.
971+
.Cm always
972+
sets the GCS feature bit regardless of input object markings.
973+
.Pp
956974
.It Cm stack-size Ns = Ns Ar size
957975
Set the main thread's stack size to
958976
.Ar size .

0 commit comments

Comments
 (0)