[lld] r355173 - [ELF] Explain some options in ld.lld.1

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 28 20:49:42 PST 2019


Author: maskray
Date: Thu Feb 28 20:49:42 2019
New Revision: 355173

URL: http://llvm.org/viewvc/llvm-project?rev=355173&view=rev
Log:
[ELF] Explain some options in ld.lld.1

Reviewers: ruiu, grimar

Reviewed By: ruiu

Subscribers: srhines, jdoerfert, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D58669

Modified:
    lld/trunk/docs/ld.lld.1

Modified: lld/trunk/docs/ld.lld.1
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/docs/ld.lld.1?rev=355173&r1=355172&r2=355173&view=diff
==============================================================================
--- lld/trunk/docs/ld.lld.1 (original)
+++ lld/trunk/docs/ld.lld.1 Thu Feb 28 20:49:42 2019
@@ -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 identical code folding.
 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. C/C++ requires each data to have a unique
+address. This option allows lld to do unsafe optimization that breaks the
+requirement: create copies of read-only data or merge two or more read-only data
+that happen to have the same value.
+.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 @@ section.
 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 @@ Do not run the linker multi-threaded.
 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 @@ Write optimization remarks in YAML forma
 .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 @@ Force
 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.




More information about the llvm-commits mailing list