Index: docs/ld.lld.1 =================================================================== --- docs/ld.lld.1 +++ docs/ld.lld.1 @@ -4,7 +4,7 @@ .\" .\" This man page documents only lld's ELF linking support, obtained originally .\" from FreeBSD. -.Dd September 26, 2018 +.Dd February 26, 2019 .Dt LD.LLD 1 .Os .Sh NAME @@ -217,6 +217,15 @@ Enable safe identical code folding. .It Fl -icf Ns = Ns Cm none Disable identical code folding. +.It Fl -ignore-data-address-equality +Ignore address equality of data. This options allows copy relocation for object +symbols with non-default visibility. When used together with +.Fl -icf=all , +both .dynsym and .llvm_addrsig are ignored for ICF. +.It Fl -ignore-function-address-equality +Ignore address equality of functions. This option allows non-PIC calls to a +function with non-default visibility in a shared object. The function may have +different addresses within the executable and within the shared object. .It Fl -image-base Ns = Ns Ar value Set the base address to .Ar value . @@ -266,6 +275,8 @@ Disable garbage collection of unused sections. .It Fl -no-gnu-unique Disable STB_GNU_UNIQUE symbol binding. +.It Fl -no-merge-exidx-entries +Disable merging .ARM.exidx entries. .It Fl -no-rosegment Do not put read-only non-executable sections in their own segment. .It Fl -no-threads @@ -274,9 +285,11 @@ Report version scripts that refer undefined symbols. .It Fl -no-undefined Report unresolved symbols even if the linker is creating a shared library. +.It Fl -no-warn-symbol-ordering +Do not warn about problems with the symbol ordering file or call graph profile. .It Fl -no-whole-archive Restores the default behavior of loading archive members. -.It Fl -no-pie +.It Fl -no-pie , Fl -no-pic-executable Do not create a position independent executable. .It Fl -noinhibit-exec Retain the executable output file whenever it is still usable. @@ -318,9 +331,51 @@ .Ar file . .It Fl -opt-remarks-with-hotness Include hotness information in the optimization remarks file. +.It Fl -orphan-handling Ns = Ns Ar mode +Control how orphan sections are handled. An orphan section is one not +specifically mentioned in a linker script. +.Ar mode +may be: +.Pp +.Bl -tag -width 2n -compact +.It Cm place +Place orphan sections in suitable output sections. +.It Cm warn +Place orphan sections as for +.Cm place +and also report a warning. +.It Cm error +Place orphan sections as for +.Cm place +and also report an error. +.El +.Pp +.Cm place +is the default. +.It Fl -pack-dyn-relocs Ns = Ns Ar format +Pack dynamic relocations in the given format. +.Ar format +may be: +.Pp +.Bl -tag -width 2n -compact +.It Cm none +Don't pack. Dynamic relocations are encoded in SHT_REL(A). +.It Cm android +Pack dynamic relocations in SHT_ANDROID_REL(A). +.It Cm relr +Pack relative relocations in SHT_RELR, and the rest of dynamic relocations in SHT_REL(A). +.It Cm android+relr +Pack relative relocations in SHT_RELR, and the rest of dynamic relocations in SHT_ANDROID_REL(A). +.El +.Pp +.Cm none +is the default. If +.Fl -use-android-relr-tags +is specified, use SHT_ANDROID_RELR instead of SHT_RELR. +.Pp .It Fl -pic-veneer Always generate position independent thunks. -.It Fl -pie +.It Fl -pie , Fl -pic-executable Create a position independent executable. .It Fl -print-gc-sections List removed unused sections. @@ -439,6 +494,8 @@ to be an undefined symbol during linking. .It Fl -unresolved-symbols Ns = Ns Ar value Determine how to handle unresolved symbols. +.It Fl -use-android-relr-tags +Use SHT_ANDROID_RELR / DT_ANDROID_RELR* tags instead of SHT_RELR / DT_RELR*. .It Fl v Display the version number and proceed with linking if object files are specified.