1 include "CommonOpts.td"
3 defm binary_architecture
4 : Eq<"binary-architecture", "Used when transforming an architecture-less "
5 "format (such as binary) to another format">;
6 def B : JoinedOrSeparate<["-"], "B">,
7 Alias<binary_architecture>,
8 HelpText<"Alias for --binary-architecture">;
10 defm target : Eq<"target", "Format of the input and output file">,
12 def F : JoinedOrSeparate<["-"], "F">,
14 HelpText<"Alias for --target">;
16 defm input_target : Eq<"input-target", "Format of the input file">,
18 def I : JoinedOrSeparate<["-"], "I">,
20 HelpText<"Alias for --input-target">;
22 defm output_target : Eq<"output-target", "Format of the output file">,
24 def O : JoinedOrSeparate<["-"], "O">,
26 HelpText<"Alias for --output-target">;
28 defm new_symbol_visibility : Eq<"new-symbol-visibility", "Visibility of "
29 "symbols generated for binary input or added"
30 " with --add-symbol unless otherwise"
31 " specified. The default value is 'default'.">;
33 def compress_debug_sections : Flag<["--"], "compress-debug-sections">;
34 def compress_debug_sections_eq
35 : Joined<["--"], "compress-debug-sections=">,
36 MetaVarName<"[ zlib | zlib-gnu ]">,
37 HelpText<"Compress DWARF debug sections using specified style. Supported "
38 "styles: 'zlib-gnu' and 'zlib'">;
39 def decompress_debug_sections : Flag<["--"], "decompress-debug-sections">,
40 HelpText<"Decompress DWARF debug sections.">;
42 : Eq<"split-dwo", "Equivalent to extract-dwo on the input file to "
43 "<dwo-file>, then strip-dwo on the input file">,
44 MetaVarName<"dwo-file">;
46 defm add_gnu_debuglink
47 : Eq<"add-gnu-debuglink", "Add a .gnu_debuglink for <debug-file>">,
48 MetaVarName<"debug-file">;
51 : Eq<"rename-section",
52 "Renames a section from old to new, optionally with specified flags. "
53 "Flags supported for GNU compatibility: alloc, load, noload, "
54 "readonly, debug, code, data, rom, share, contents, merge, strings.">,
55 MetaVarName<"old=new[,flag1,...]">;
57 : Eq<"redefine-sym", "Change the name of a symbol old to new">,
58 MetaVarName<"old=new">;
61 "Reads a list of symbol pairs from <filename> and runs as if "
62 "--redefine-sym=<old>=<new> is set for each one. <filename> "
63 "contains two symbols per line separated with whitespace and may "
64 "contain comments beginning with '#'. Leading and trailing "
65 "whitespace is stripped from each line. May be repeated to read "
66 "symbols from many files.">,
67 MetaVarName<"filename">;
69 defm only_section : Eq<"only-section", "Remove all but <section>">,
70 MetaVarName<"section">;
71 def j : JoinedOrSeparate<["-"], "j">,
73 HelpText<"Alias for --only-section">;
76 "Make a section named <section> with the contents of <file>.">,
77 MetaVarName<"section=file">;
79 defm set_section_flags
80 : Eq<"set-section-flags",
81 "Set section flags for a given section. Flags supported for GNU "
82 "compatibility: alloc, load, noload, readonly, debug, code, data, "
83 "rom, share, contents, merge, strings.">,
84 MetaVarName<"section=flag1[,flag2,...]">;
86 def S : Flag<["-"], "S">,
88 HelpText<"Alias for --strip-all">;
89 def strip_dwo : Flag<["--"], "strip-dwo">,
90 HelpText<"Remove all DWARF .dwo sections from file">;
92 : Flag<["--"], "strip-non-alloc">,
93 HelpText<"Remove all non-allocated sections outside segments">;
94 defm strip_unneeded_symbol
95 : Eq<"strip-unneeded-symbol",
96 "Remove symbol <symbol> if it is not needed by relocations">,
97 MetaVarName<"symbol">;
98 defm strip_unneeded_symbols
99 : Eq<"strip-unneeded-symbols",
100 "Reads a list of symbols from <filename> and removes them "
101 "if they are not needed by relocations">,
102 MetaVarName<"filename">;
105 : Flag<["--"], "extract-dwo">,
107 "Remove all sections that are not DWARF .dwo sections from file">;
109 defm extract_partition
110 : Eq<"extract-partition", "Extract named partition from input file">,
112 def extract_main_partition
113 : Flag<["--"], "extract-main-partition">,
114 HelpText<"Extract main partition from the input file">;
117 : Flag<["--"], "localize-hidden">,
119 "Mark all symbols that have hidden or internal visibility as local">;
120 defm localize_symbol : Eq<"localize-symbol", "Mark <symbol> as local">,
121 MetaVarName<"symbol">;
122 defm localize_symbols
123 : Eq<"localize-symbols",
124 "Reads a list of symbols from <filename> and marks them local.">,
125 MetaVarName<"filename">;
127 def L : JoinedOrSeparate<["-"], "L">,
128 Alias<localize_symbol>,
129 HelpText<"Alias for --localize-symbol">;
131 defm globalize_symbol : Eq<"globalize-symbol", "Mark <symbol> as global">,
132 MetaVarName<"symbol">;
134 defm globalize_symbols
135 : Eq<"globalize-symbols",
136 "Reads a list of symbols from <filename> and marks them global.">,
137 MetaVarName<"filename">;
139 defm keep_global_symbol
140 : Eq<"keep-global-symbol",
141 "Convert all symbols except <symbol> to local. May be repeated to "
142 "convert all except a set of symbols to local.">,
143 MetaVarName<"symbol">;
144 def G : JoinedOrSeparate<["-"], "G">,
145 Alias<keep_global_symbol>,
146 HelpText<"Alias for --keep-global-symbol">;
148 defm keep_global_symbols
149 : Eq<"keep-global-symbols",
150 "Reads a list of symbols from <filename> and runs as if "
151 "--keep-global-symbol=<symbol> is set for each one. <filename> "
152 "contains one symbol per line and may contain comments beginning with "
153 "'#'. Leading and trailing whitespace is stripped from each line. May "
154 "be repeated to read symbols from many files.">,
155 MetaVarName<"filename">;
157 defm weaken_symbol : Eq<"weaken-symbol", "Mark <symbol> as weak">,
158 MetaVarName<"symbol">;
160 : Eq<"weaken-symbols",
161 "Reads a list of symbols from <filename> and marks them weak.">,
162 MetaVarName<"filename">;
164 def W : JoinedOrSeparate<["-"], "W">,
165 Alias<weaken_symbol>,
166 HelpText<"Alias for --weaken-symbol">;
167 def weaken : Flag<["--"], "weaken">,
168 HelpText<"Mark all global symbols as weak">;
171 : Eq<"strip-symbols",
172 "Reads a list of symbols from <filename> and removes them.">,
173 MetaVarName<"filename">;
177 "Reads a list of symbols from <filename> and runs as if "
178 "--keep-symbol=<symbol> is set for each one. <filename> "
179 "contains one symbol per line and may contain comments beginning with "
180 "'#'. Leading and trailing whitespace is stripped from each line. May "
181 "be repeated to read symbols from many files.">,
182 MetaVarName<"filename">;
186 "Dump contents of section named <section> into file <file>">,
187 MetaVarName<"section=file">;
189 : Eq<"prefix-symbols", "Add <prefix> to the start of every symbol name">,
190 MetaVarName<"prefix">;
192 defm prefix_alloc_sections
193 : Eq<"prefix-alloc-sections", "Add <prefix> to the start of every allocated section name">,
194 MetaVarName<"prefix">;
196 defm build_id_link_dir
197 : Eq<"build-id-link-dir", "Set directory for --build-id-link-input and "
198 "--build-id-link-output to <dir>">,
200 defm build_id_link_input
201 : Eq<"build-id-link-input", "Hard-link the input to <dir>/xx/xxx<suffix> "
202 "name derived from hex build ID">,
203 MetaVarName<"suffix">;
204 defm build_id_link_output
205 : Eq<"build-id-link-output", "Hard-link the output to <dir>/xx/xxx<suffix> "
206 "name derived from hex build ID">,
207 MetaVarName<"suffix">;
209 defm set_start : Eq<"set-start", "Set the start address to <addr>. Overrides "
210 "any previous --change-start or --adjust-start values.">,
212 defm change_start : Eq<"change-start", "Add <incr> to the start address. Can be "
213 "specified multiple times, all values will be applied "
216 def adjust_start : JoinedOrSeparate<["--"], "adjust-start">,
218 HelpText<"Alias for --change-start">;
221 : Eq<"add-symbol", "Add new symbol <name> to .symtab. Accepted flags: "
222 "global, local, weak, default, hidden, protected, file, section, object, "
223 "function, indirect-function. Accepted but ignored for "
224 "compatibility: debug, constructor, warning, indirect, synthetic, "
225 "unique-object, before.">,
226 MetaVarName<"name=[section:]value[,flags]">;