diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:12:21 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:12:21 +0000 |
commit | eb1ff93d02b5f17b6b409e83c6d9be585f4a04b3 (patch) | |
tree | 7490b4a8943293f251ad733465936e6ec302b3e9 /ELF/Options.td | |
parent | bafea25f368c63f0b39789906adfed6e39219e64 (diff) | |
download | src-eb1ff93d02b5f17b6b409e83c6d9be585f4a04b3.tar.gz src-eb1ff93d02b5f17b6b409e83c6d9be585f4a04b3.zip |
Vendor import of lld trunk r321017:vendor/lld/lld-trunk-r321017
Notes
Notes:
svn path=/vendor/lld/dist/; revision=326947
svn path=/vendor/lld/lld-trunk-r321017/; revision=326948; tag=vendor/lld/lld-trunk-r321017
Diffstat (limited to 'ELF/Options.td')
-rw-r--r-- | ELF/Options.td | 177 |
1 files changed, 100 insertions, 77 deletions
diff --git a/ELF/Options.td b/ELF/Options.td index 1400a206bdfc..20027e90aefd 100644 --- a/ELF/Options.td +++ b/ELF/Options.td @@ -5,7 +5,11 @@ include "llvm/Option/OptParser.td" class F<string name>: Flag<["--", "-"], name>; class J<string name>: Joined<["--", "-"], name>; class S<string name>: Separate<["--", "-"], name>; -class JS<string name>: JoinedOrSeparate<["--", "-"], name>; + +multiclass Eq<string name> { + def "": Separate<["--", "-"], name>; + def _eq: Joined<["--", "-"], name # "=">, Alias<!cast<Separate>(NAME)>; +} def auxiliary: S<"auxiliary">, HelpText<"Set DT_AUXILIARY field to the specified name">; @@ -22,21 +26,24 @@ def build_id: F<"build-id">, HelpText<"Generate build ID note">; def build_id_eq: J<"build-id=">, HelpText<"Generate build ID note">; -def compress_debug_sections : J<"compress-debug-sections=">, +defm compress_debug_sections : Eq<"compress-debug-sections">, HelpText<"Compress DWARF debug sections">; -def defsym: J<"defsym=">, HelpText<"Define a symbol alias">; +defm defsym: Eq<"defsym">, HelpText<"Define a symbol alias">; -def L: JoinedOrSeparate<["-"], "L">, MetaVarName<"<dir>">, - HelpText<"Add a directory to the library search path">; +defm library_path: Eq<"library-path">, + HelpText<"Add a directory to the library search path">, MetaVarName<"<dir>">; -def O: Joined<["-"], "O">, HelpText<"Optimize output file size">; +def O: JoinedOrSeparate<["-"], "O">, HelpText<"Optimize output file size">; -def Tbss: S<"Tbss">, HelpText<"Same as --section-start with .bss as the sectionname">; +defm Tbss: Eq<"Tbss">, + HelpText<"Same as --section-start with .bss as the sectionname">; -def Tdata: S<"Tdata">, HelpText<"Same as --section-start with .data as the sectionname">; +defm Tdata: Eq<"Tdata">, + HelpText<"Same as --section-start with .data as the sectionname">; -def Ttext: S<"Ttext">, HelpText<"Same as --section-start with .text as the sectionname">; +defm Ttext: Eq<"Ttext">, + HelpText<"Same as --section-start with .text as the sectionname">; def allow_multiple_definition: F<"allow-multiple-definition">, HelpText<"Allow multiple definitions">; @@ -44,6 +51,9 @@ def allow_multiple_definition: F<"allow-multiple-definition">, def as_needed: F<"as-needed">, HelpText<"Only set DT_NEEDED for shared libraries if used">; +// -chroot doesn't have a help text because it is an internal option. +def chroot: S<"chroot">; + def color_diagnostics: F<"color-diagnostics">, HelpText<"Use colors in diagnostics">; @@ -69,7 +79,7 @@ def discard_none: F<"discard-none">, def dynamic_linker: S<"dynamic-linker">, HelpText<"Which dynamic linker to use">; -def dynamic_list: S<"dynamic-list">, +defm dynamic_list: Eq<"dynamic-list">, HelpText<"Read a list of dynamic symbols">; def eh_frame_hdr: F<"eh-frame-hdr">, @@ -83,37 +93,42 @@ def enable_new_dtags: F<"enable-new-dtags">, def end_lib: F<"end-lib">, HelpText<"End a grouping of objects that should be treated as if they were together in an archive">; -def entry: S<"entry">, MetaVarName<"<entry>">, - HelpText<"Name of entry point symbol">; +defm entry: Eq<"entry">, HelpText<"Name of entry point symbol">, + MetaVarName<"<entry>">; -def error_limit: S<"error-limit">, +defm error_limit: Eq<"error-limit">, HelpText<"Maximum number of errors to emit before stopping (0 = no limit)">; def error_unresolved_symbols: F<"error-unresolved-symbols">, HelpText<"Report unresolved symbols as errors">; -def exclude_libs: S<"exclude-libs">, +defm exclude_libs: Eq<"exclude-libs">, HelpText<"Exclude static libraries from automatic export">; def export_dynamic: F<"export-dynamic">, HelpText<"Put symbols in the dynamic symbol table">; -def export_dynamic_symbol: S<"export-dynamic-symbol">, +defm export_dynamic_symbol: Eq<"export-dynamic-symbol">, HelpText<"Put a symbol in the dynamic symbol table">; def fatal_warnings: F<"fatal-warnings">, HelpText<"Treat warnings as errors">; -def filter: J<"filter=">, HelpText<"Set DT_FILTER field to the specified name">; +defm filter: Eq<"filter">, + HelpText<"Set DT_FILTER field to the specified name">; -def fini: S<"fini">, MetaVarName<"<symbol>">, - HelpText<"Specify a finalizer function">; +defm fini: Eq<"fini">, + HelpText<"Specify a finalizer function">, MetaVarName<"<symbol>">; + +def fix_cortex_a53_843419: F<"fix-cortex-a53-843419">, + HelpText<"Apply fixes for AArch64 Cortex-A53 erratum 843419">; def full_shutdown : F<"full-shutdown">, HelpText<"Perform a full shutdown instead of calling _exit">; -def format: J<"format=">, MetaVarName<"<input-format>">, - HelpText<"Change the input format of the inputs following this option">; +defm format: Eq<"format">, + HelpText<"Change the input format of the inputs following this option">, + MetaVarName<"<input-format>">; def gc_sections: F<"gc-sections">, HelpText<"Enable garbage collection of unused sections">; @@ -121,29 +136,35 @@ def gc_sections: F<"gc-sections">, def gdb_index: F<"gdb-index">, HelpText<"Generate .gdb_index section">; -def hash_style: S<"hash-style">, +defm hash_style: Eq<"hash-style">, HelpText<"Specify hash style (sysv, gnu or both)">; def help: F<"help">, HelpText<"Print option help">; def icf_all: F<"icf=all">, HelpText<"Enable identical code folding">; +def icf_data: F<"icf-data">, + HelpText<"Enable ICF to also fold identical read only data">; + def icf_none: F<"icf=none">, HelpText<"Disable identical code folding">; -def image_base : J<"image-base=">, HelpText<"Set the base address">; +defm image_base : Eq<"image-base">, HelpText<"Set the base address">; -def init: S<"init">, MetaVarName<"<symbol>">, - HelpText<"Specify an initializer function">; +defm init: Eq<"init">, HelpText<"Specify an initializer function">, + MetaVarName<"<symbol>">; -def l: JoinedOrSeparate<["-"], "l">, MetaVarName<"<libName>">, - HelpText<"Root name of library to use">; +defm library: Eq<"library">, HelpText<"Root name of library to use">, + MetaVarName<"<libName>">; def lto_O: J<"lto-O">, MetaVarName<"<opt-level>">, HelpText<"Optimization level for LTO">; def m: JoinedOrSeparate<["-"], "m">, HelpText<"Set target emulation">; -def Map: JS<"Map">, HelpText<"Print a link map to the specified file">; +defm Map: Eq<"Map">, HelpText<"Print a link map to the specified file">; + +def merge_exidx_entries: F<"merge-exidx-entries">, + HelpText<"Enable merging .ARM.exidx entries">; def nostdlib: F<"nostdlib">, HelpText<"Only search directories specified on the command line">; @@ -163,15 +184,24 @@ def no_demangle: F<"no-demangle">, def no_dynamic_linker: F<"no-dynamic-linker">, HelpText<"Inhibit output of .interp section">; +def no_eh_frame_hdr: F<"no-eh-frame-hdr">, + HelpText<"Do not create .eh_frame_hdr section">; + def no_export_dynamic: F<"no-export-dynamic">; def no_fatal_warnings: F<"no-fatal-warnings">; def no_gc_sections: F<"no-gc-sections">, HelpText<"Disable garbage collection of unused sections">; +def no_gdb_index: F<"no-gdb-index">, + HelpText<"Do not generate .gdb_index section">; + def no_gnu_unique: F<"no-gnu-unique">, HelpText<"Disable STB_GNU_UNIQUE symbol binding">; +def no_merge_exidx_entries: F<"no-merge-exidx-entries">, + HelpText<"Disable merging .ARM.exidx entries">; + def no_threads: F<"no-threads">, HelpText<"Do not run the linker multi-threaded">; @@ -183,7 +213,14 @@ def noinhibit_exec: F<"noinhibit-exec">, def nopie: F<"nopie">, HelpText<"Do not create a position independent executable">; -def no_rosegment: F<"no-rosegment">, HelpText<"Do not put read-only non-executable sections in their own segment">; +def no_omagic: Flag<["--"], "no-omagic">, MetaVarName<"<magic>">, + HelpText<"Do not set the text data sections to be writable">; + +def no_print_gc_sections: F<"no-print-gc-sections">, + HelpText<"Do not list removed unused sections">; + +def no_rosegment: F<"no-rosegment">, + HelpText<"Do not put read-only non-executable sections in their own segment">; def no_undefined: F<"no-undefined">, HelpText<"Report unresolved symbols even if the linker is creating a shared library">; @@ -200,6 +237,12 @@ def oformat: Separate<["--"], "oformat">, MetaVarName<"<format>">, def omagic: Flag<["--"], "omagic">, MetaVarName<"<magic>">, HelpText<"Set the text and data sections to be readable and writable">; +defm orphan_handling: Eq<"orphan-handling">, + HelpText<"Control how orphan sections are handled when linker script used">; + +def pack_dyn_relocs_eq: J<"pack-dyn-relocs=">, MetaVarName<"<format>">, + HelpText<"Pack dynamic relocations in the given format (none or android)">; + def pie: F<"pie">, HelpText<"Create a position independent executable">; def print_gc_sections: F<"print-gc-sections">, @@ -208,26 +251,28 @@ def print_gc_sections: F<"print-gc-sections">, def print_map: F<"print-map">, HelpText<"Print a link map to the standard output">; -def reproduce: S<"reproduce">, +defm reproduce: Eq<"reproduce">, HelpText<"Dump linker invocation and input files for debugging">; -def rpath: S<"rpath">, HelpText<"Add a DT_RUNPATH to the output">; +defm rpath: Eq<"rpath">, HelpText<"Add a DT_RUNPATH to the output">; def relocatable: F<"relocatable">, HelpText<"Create relocatable object file">; -def retain_symbols_file: J<"retain-symbols-file=">, MetaVarName<"<file>">, - HelpText<"Retain only the symbols listed in the file">; +defm retain_symbols_file: Eq<"retain-symbols-file">, + HelpText<"Retain only the symbols listed in the file">, + MetaVarName<"<file>">; -def script: S<"script">, HelpText<"Read linker script">; +defm script: Eq<"script">, HelpText<"Read linker script">; def section_start: S<"section-start">, MetaVarName<"<address>">, HelpText<"Set address of section">; def shared: F<"shared">, HelpText<"Build a shared object">; -def soname: J<"soname=">, HelpText<"Set DT_SONAME">; +defm soname: Eq<"soname">, HelpText<"Set DT_SONAME">; -def sort_section: S<"sort-section">, HelpText<"Specifies sections sorting rule when linkerscript is used">; +defm sort_section: Eq<"sort-section">, + HelpText<"Specifies sections sorting rule when linkerscript is used">; def start_lib: F<"start-lib">, HelpText<"Start a grouping of objects that should be treated as if they were together in an archive">; @@ -239,27 +284,29 @@ def strip_debug: F<"strip-debug">, HelpText<"Strip debugging information">; def symbol_ordering_file: S<"symbol-ordering-file">, HelpText<"Layout sections in the order specified by symbol file">; -def sysroot: J<"sysroot=">, HelpText<"Set the system root">; +defm sysroot: Eq<"sysroot">, HelpText<"Set the system root">; def target1_rel: F<"target1-rel">, HelpText<"Interpret R_ARM_TARGET1 as R_ARM_REL32">; def target1_abs: F<"target1-abs">, HelpText<"Interpret R_ARM_TARGET1 as R_ARM_ABS32">; -def target2: J<"target2=">, MetaVarName<"<type>">, HelpText<"Interpret R_ARM_TARGET2 as <type>, where <type> is one of rel, abs, or got-rel">; +defm target2: Eq<"target2">, + HelpText<"Interpret R_ARM_TARGET2 as <type>, where <type> is one of rel, abs, or got-rel">, + MetaVarName<"<type>">; def threads: F<"threads">, HelpText<"Run the linker multi-threaded">; def trace: F<"trace">, HelpText<"Print the names of the input files">; -def trace_symbol : S<"trace-symbol">, HelpText<"Trace references to symbols">; +defm trace_symbol : Eq<"trace-symbol">, HelpText<"Trace references to symbols">; -def undefined: S<"undefined">, +defm undefined: Eq<"undefined">, HelpText<"Force undefined symbol during linking">; -def unresolved_symbols: J<"unresolved-symbols=">, +defm unresolved_symbols: Eq<"unresolved-symbols">, HelpText<"Determine how to handle unresolved symbols">; -def rsp_quoting: J<"rsp-quoting=">, +defm rsp_quoting: Eq<"rsp-quoting">, HelpText<"Quoting style for response files. Values supported: windows|posix">; def v: Flag<["-"], "v">, HelpText<"Display the version number">; @@ -268,8 +315,7 @@ def verbose: F<"verbose">, HelpText<"Verbose mode">; def version: F<"version">, HelpText<"Display the version number and exit">; -def version_script: S<"version-script">, - HelpText<"Read a version script">; +defm version_script: Eq<"version-script">, HelpText<"Read a version script">; def warn_common: F<"warn-common">, HelpText<"Warn about duplicate common symbols">; @@ -280,8 +326,8 @@ def warn_unresolved_symbols: F<"warn-unresolved-symbols">, def whole_archive: F<"whole-archive">, HelpText<"Force load of all members in a static library">; -def wrap: S<"wrap">, MetaVarName<"<symbol>">, - HelpText<"Use wrapper functions for symbol">; +defm wrap: Eq<"wrap">, HelpText<"Use wrapper functions for symbol">, + MetaVarName<"<symbol>">; def z: JoinedOrSeparate<["-"], "z">, MetaVarName<"<option>">, HelpText<"Linker option extensions">; @@ -293,60 +339,36 @@ def alias_Bdynamic_dy: F<"dy">, Alias<Bdynamic>; def alias_Bstatic_dn: F<"dn">, Alias<Bstatic>; def alias_Bstatic_non_shared: F<"non_shared">, Alias<Bstatic>; def alias_Bstatic_static: F<"static">, Alias<Bstatic>; -def alias_L__library_path: J<"library-path=">, Alias<L>; def alias_define_common_d: Flag<["-"], "d">, Alias<define_common>; def alias_define_common_dc: F<"dc">, Alias<define_common>; def alias_define_common_dp: F<"dp">, Alias<define_common>; -def alias_defsym: S<"defsym">, Alias<defsym>; def alias_discard_all_x: Flag<["-"], "x">, Alias<discard_all>; def alias_discard_locals_X: Flag<["-"], "X">, Alias<discard_locals>; -def alias_dynamic_list: J<"dynamic-list=">, Alias<dynamic_list>; def alias_emit_relocs: Flag<["-"], "q">, Alias<emit_relocs>; def alias_entry_e: JoinedOrSeparate<["-"], "e">, Alias<entry>; -def alias_entry_entry: J<"entry=">, Alias<entry>; -def alias_error_limit: J<"error-limit=">, Alias<error_limit>; -def alias_exclude_libs: J<"exclude-libs=">, Alias<exclude_libs>; def alias_export_dynamic_E: Flag<["-"], "E">, Alias<export_dynamic>; -def alias_export_dynamic_symbol: J<"export-dynamic-symbol=">, - Alias<export_dynamic_symbol>; def alias_filter: Separate<["-"], "F">, Alias<filter>; -def alias_fini_fini: J<"fini=">, Alias<fini>; def alias_format_b: S<"b">, Alias<format>; -def alias_hash_style_hash_style: J<"hash-style=">, Alias<hash_style>; -def alias_init_init: J<"init=">, Alias<init>; -def alias_l__library: J<"library=">, Alias<l>; -def alias_Map_eq: J<"Map=">, Alias<Map>; +def alias_library: JoinedOrSeparate<["-"], "l">, Alias<library>; +def alias_library_path: JoinedOrSeparate<["-"], "L">, Alias<library_path>; def alias_omagic: Flag<["-"], "N">, Alias<omagic>; def alias_o_output: Joined<["--"], "output=">, Alias<o>; def alias_o_output2 : Separate<["--"], "output">, Alias<o>; def alias_pie_pic_executable: F<"pic-executable">, Alias<pie>; def alias_print_map_M: Flag<["-"], "M">, Alias<print_map>; def alias_relocatable_r: Flag<["-"], "r">, Alias<relocatable>; -def alias_reproduce_eq: J<"reproduce=">, Alias<reproduce>; -def alias_retain_symbols_file: S<"retain-symbols-file">, Alias<retain_symbols_file>; def alias_rpath_R: JoinedOrSeparate<["-"], "R">, Alias<rpath>; -def alias_rpath_rpath: J<"rpath=">, Alias<rpath>; def alias_script_T: JoinedOrSeparate<["-"], "T">, Alias<script>; def alias_shared_Bshareable: F<"Bshareable">, Alias<shared>; def alias_soname_h: JoinedOrSeparate<["-"], "h">, Alias<soname>; -def alias_soname_soname: S<"soname">, Alias<soname>; -def alias_sort_section: J<"sort-section=">, Alias<sort_section>; -def alias_script: J<"script=">, Alias<script>; def alias_strip_all: Flag<["-"], "s">, Alias<strip_all>; def alias_strip_debug_S: Flag<["-"], "S">, Alias<strip_debug>; -def alias_Tbss: J<"Tbss=">, Alias<Tbss>; -def alias_Tdata: J<"Tdata=">, Alias<Tdata>; def alias_trace: Flag<["-"], "t">, Alias<trace>; -def trace_trace_symbol_eq : J<"trace-symbol=">, Alias<trace_symbol>; def alias_trace_symbol_y : JoinedOrSeparate<["-"], "y">, Alias<trace_symbol>; -def alias_Ttext: J<"Ttext=">, Alias<Ttext>; def alias_Ttext_segment: S<"Ttext-segment">, Alias<Ttext>; def alias_Ttext_segment_eq: J<"Ttext-segment=">, Alias<Ttext>; -def alias_undefined_eq: J<"undefined=">, Alias<undefined>; def alias_undefined_u: JoinedOrSeparate<["-"], "u">, Alias<undefined>; -def alias_version_script_eq: J<"version-script=">, Alias<version_script>; def alias_version_V: Flag<["-"], "V">, Alias<version>; -def alias_wrap_wrap: J<"wrap=">, Alias<wrap>; // Our symbol resolution algorithm handles symbols in archive files differently // than traditional linkers, so we don't need --start-group and --end-group. @@ -369,6 +391,8 @@ def opt_remarks_filename: Separate<["--"], "opt-remarks-filename">, HelpText<"YAML output file for optimization remarks">; def opt_remarks_with_hotness: Flag<["--"], "opt-remarks-with-hotness">, HelpText<"Include hotness informations in the optimization remarks file">; +defm plugin_opt: Eq<"plugin-opt">, + HelpText<"specifies LTO options for compatibility with GNU linkers">; def save_temps: F<"save-temps">; def thinlto_cache_dir: J<"thinlto-cache-dir=">, HelpText<"Path to ThinLTO cached object file directory">; @@ -385,18 +409,17 @@ def thinlto_jobs: J<"thinlto-jobs=">, HelpText<"Number of ThinLTO jobs">; // --version output. def plugin: S<"plugin">; def plugin_eq: J<"plugin=">; -def plugin_opt: S<"plugin-opt">; -def plugin_opt_eq: J<"plugin-opt=">; // Options listed below are silently ignored for now for compatibility. def allow_shlib_undefined: F<"allow-shlib-undefined">; -def cref: Flag<["--"], "cref">; +def cref: F<"cref">; def detect_odr_violations: F<"detect-odr-violations">; def g: Flag<["-"], "g">; +def long_plt: F<"long-plt">; def no_add_needed: F<"no-add-needed">; def no_allow_shlib_undefined: F<"no-allow-shlib-undefined">; -def no_copy_dt_needed_entries: F<"no-copy-dt-needed-entries">, - Alias<no_add_needed>; +def no_copy_dt_needed_entries: F<"no-copy-dt-needed-entries">; +def no_ctors_in_init_array: F<"no-ctors-in-init-array">; def no_keep_memory: F<"no-keep-memory">; def no_mmap_output_file: F<"no-mmap-output-file">; def no_warn_common: F<"no-warn-common">; @@ -406,9 +429,9 @@ def rpath_link_eq: J<"rpath-link=">; def sort_common: F<"sort-common">; def stats: F<"stats">; def warn_execstack: F<"warn-execstack">; +def warn_once: F<"warn-once">; def warn_shared_textrel: F<"warn-shared-textrel">; def EB : F<"EB">; def EL : F<"EL">; def G: JoinedOrSeparate<["-"], "G">; def Qy : F<"Qy">; - |