//===- Options.td ---------------------------------------------------------===// // // The MCLinker Project // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// include "llvm/Option/OptParser.td" //===----------------------------------------------------------------------===// // Dynamic //===----------------------------------------------------------------------===// def DynamicGroup : OptionGroup<"dynamic">, HelpText<"DYNAMIC OPTIONS">; def Entry : Joined<["--"], "entry=">, Group, HelpText<"Use the explicit symbol as the entrance of your program">; def EntryAlias : Separate<["-"], "e">, Alias; def Bsymbolic : Flag<["-"], "Bsymbolic">, Group, HelpText<"Bind references within the shared library">; def Bgroup : Flag<["-"], "Bgroup">, Group, HelpText<"Info the dynamic linker to lookup only inside the group">; def SOName : Joined<["-"], "soname=">, Group, HelpText<"Set internal name of shared library">; def SONameAlias : Separate<["-"], "soname">, Group, Alias; def NoUndef : Flag<["--"], "no-undefined">, Group, HelpText<"Do not allow unresolved references">; def AllowMulDefs : Flag<["--"], "allow-multiple-definition">, Group, HelpText<"Allow multiple definitions">; def Z : Separate<["-"], "z">, Group, HelpText<"Extensions for GNU ld compatibility">; def Dyld : Joined<["--"], "dynamic-linker=">, Group, HelpText<"Set the name of the dynamic linker">; def DyldAlias : Separate<["-"], "dynamic-linker">, Group, Alias; def EnableNewDTags : Flag<["--"], "enable-new-dtags">, Group, HelpText<"Enable use of DT_RUNPATH and DT_FLAGS">; def SpareDTags: Separate<["--"], "spare-dynamic-tags">, Group, HelpText<"Set the number of spare dyanmic tags (DT_NULL)">; //===----------------------------------------------------------------------===// // Optimization //===----------------------------------------------------------------------===// def OptimizationGroup : OptionGroup<"optimization">, HelpText<"OPTIMIZATION OPTIONS">; def GCSections : Flag<["--"], "gc-sections">, Group, HelpText<"Enable garbage collection of unused input sections">; def NoGCSections : Flag<["--"], "no-gc-sections">, Group, HelpText<"Disable garbage collection of unused input sections">; def PrintGCSections : Flag<["--"], "print-gc-sections">, Group, HelpText<"List all sections removed by garbage collection">; def NoPrintGCSections : Flag<["--"], "no-print-gc-sections">, Group, HelpText<"Do not list sections removed by garbage collection">; def LDGeneratedUnwindInfo : Flag<["--"], "ld-generated-unwind-info">, Group, HelpText<"Request creation of unwind info for linker generated code sections like PLT">; def NoLDGeneratedUnwindInfo : Flag<["--"], "no-ld-generated-unwind-info">, Group, HelpText<"Don't create unwind info for linker generated sections to save size">; def ICF : Joined<["--"], "icf=">, Group, HelpText<"Identical Code Folding">; def ICFIters : Separate<["--"], "icf-iterations">, Group, HelpText<"Set number of iterations to do ICF">; def PrintICFSections : Flag<["--"], "print-icf-sections">, Group, HelpText<"List all sections folded by ICF">; def NoPrintICFSections : Flag<["--"], "no-print-icf-sections">, Group, HelpText<"Do not list sections folded by ICF">; //===----------------------------------------------------------------------===// // Output //===----------------------------------------------------------------------===// def OutputGroup : OptionGroup<"output">, HelpText<"OUTPUT OPTIONS">; def Output : Separate<["-"], "o">, Group, HelpText<"Output filename">; def OutputAlias : Joined<["--"], "output=">, Group, Alias; def OutputFormat: Joined<["--"], "oformat=">, Group, HelpText<"Output format">; def Shared : Flag<["-"], "shared">, Group, HelpText<"Create a shared library">; def Bshareable : Flag<["-"], "Bshareable">, Group, Alias; def Bdynamic : Flag<["-"], "Bdynamic">, Group, HelpText<"Link against dynamic library">; def BdynamicAlias1 : Flag<["-"], "dy">, Group, Alias; def BdynamicAlias2 : Flag<["-"], "call_shared">, Group, Alias; def Bstatic : Flag<["-"], "Bstatic">, Group, HelpText<"Link against static library">; def BstaticAlias1 : Flag<["-"], "dn">, Group, Alias; def BstaticAlias2 : Flag<["-"], "non_shared">, Group, Alias; def BstaticAlias3 : Flag<["-"], "static">, Group, Alias; def PIE : Flag<["-"], "pie">, Group, HelpText<"Emit a position-independent executable file">; def PICExec : Flag<["--"], "pic-executable">, Group, Alias; def Relocatable : Flag<["--"], "relocatable">, Group, HelpText<"Generate relocatable output">; def RelocatableAlias : Flag<["-"], "r">, Group, Alias; def InputFormat : Joined<["--"], "format=">, Group, HelpText<"Specify the binary format for input object files that follow this option on the command line">; def InputFormatAlias : Separate<["-"], "b">, Group, Alias; def StripDebug : Flag<["--"], "strip-debug">, Group, HelpText<"Omit debugger symbol information from the output file">; def StripDebugAlias : Flag<["-"], "S">, Group, Alias; def StripAll : Flag<["--"], "strip-all">, Group, HelpText<"Omit all symbol information from the output file">; def StripAllAlias : Flag<["-"], "s">, Group, Alias; def DiscardLocals : Flag<["--"], "discard-debug">, Group, HelpText<"Discard all temporary local symbols">; def DiscardLocalsAlias : Flag<["-"], "X">, Group, Alias; def DiscardAll : Flag<["--"], "discard-all">, Group, HelpText<"Discard all local symbols">; def DiscardAllAlias : Flag<["-"], "x">, Group, Alias; def EHFrameHdr : Flag<["--"], "eh-frame-hdr">, Group, HelpText<"Request creation of .eh_frame_hdr section and PT_GNU_EH_FRAME segment">; def NMagic : Flag<["--"], "nmagic">, Group, HelpText<"Do not page align data">; def NMagicAlias : Flag<["-"], "n">, Group, Alias; def OMagic : Flag<["--"], "omagic">, Group, HelpText<"Do not page align data, do not make text readonly">; def OMagicAlias : Flag<["-"], "N">, Group, Alias; def HashStyle : Joined<["--"], "hash-style=">, Group, HelpText<"Set the type of linker's hash table(s)">; def ExportDynamic : Flag<["--"], "export-dynamic">, Group, HelpText<"Export all dynamic symbols">; def ExportDynamicAlias : Flag<["-"], "E">, Group, Alias; def NoExportDynamic : Flag<["--"], "no-export-dynamic">, Group, HelpText<"Not export all dynamic symbols">; def NoWarnMismatch : Flag<["--"], "no-warn-mismatch">, Group, HelpText<"Allow linking together mismatched input files">; def ExcludeLibs : Separate<["--"], "exclude-libs">, Group, HelpText<"Allow linking together mismatched input files">; def BuildID : Flag<["--"], "build-id">, Group, HelpText<"Request creation of .note.gnu.build-id ELF note section">; //===----------------------------------------------------------------------===// // Positional //===----------------------------------------------------------------------===// def PositionalGroup : OptionGroup<"positional">, HelpText<"POSITIONAL OPTIONS">; def Script : Joined<["--"], "script=">, Group, HelpText<"Use the given file as the linker script">; def ScriptAlias : Separate<["-"], "T">, Group, Alias