1 include "CommonOpts.td"
3 defm binary_architecture
4 : Eq<"binary-architecture", "Ignored for compatibility">;
5 def B : JoinedOrSeparate<["-"], "B">,
6 Alias<binary_architecture>,
7 HelpText<"Alias for --binary-architecture">;
9 defm target : Eq<"target", "Format of the input and output file">,
11 def F : JoinedOrSeparate<["-"], "F">,
13 HelpText<"Alias for --target">;
15 defm input_target : Eq<"input-target", "Format of the input file">,
17 def I : JoinedOrSeparate<["-"], "I">,
19 HelpText<"Alias for --input-target">;
21 defm output_target : Eq<"output-target", "Format of the output file">,
23 def O : JoinedOrSeparate<["-"], "O">,
25 HelpText<"Alias for --output-target">;
27 defm new_symbol_visibility : Eq<"new-symbol-visibility", "Visibility of "
28 "symbols generated for binary input or added"
29 " with --add-symbol unless otherwise"
30 " specified. The default value is 'default'.">;
32 def compress_debug_sections : Flag<["--"], "compress-debug-sections">;
33 def compress_debug_sections_eq
34 : Joined<["--"], "compress-debug-sections=">,
35 MetaVarName<"[ zlib | zlib-gnu ]">,
36 HelpText<"Compress DWARF debug sections using specified style. Supported "
37 "styles: 'zlib-gnu' and 'zlib'">;
38 def decompress_debug_sections : Flag<["--"], "decompress-debug-sections">,
39 HelpText<"Decompress DWARF debug sections.">;
41 : Eq<"split-dwo", "Equivalent to extract-dwo on the input file to "
42 "<dwo-file>, then strip-dwo on the input file">,
43 MetaVarName<"dwo-file">;
45 defm add_gnu_debuglink
46 : Eq<"add-gnu-debuglink", "Add a .gnu_debuglink for <debug-file>">,
47 MetaVarName<"debug-file">;
50 : Eq<"rename-section",
51 "Renames a section from old to new, optionally with specified flags. "
52 "Flags supported for GNU compatibility: alloc, load, noload, "
53 "readonly, debug, code, data, rom, share, contents, merge, strings.">,
54 MetaVarName<"old=new[,flag1,...]">;
56 : Eq<"redefine-sym", "Change the name of a symbol old to new">,
57 MetaVarName<"old=new">;
60 "Reads a list of symbol pairs from <filename> and runs as if "
61 "--redefine-sym=<old>=<new> is set for each one. <filename> "
62 "contains two symbols per line separated with whitespace and may "
63 "contain comments beginning with '#'. Leading and trailing "
64 "whitespace is stripped from each line. May be repeated to read "
65 "symbols from many files.">,
66 MetaVarName<"filename">;
68 defm only_section : Eq<"only-section", "Remove all but <section>">,
69 MetaVarName<"section">;
70 def j : JoinedOrSeparate<["-"], "j">,
72 HelpText<"Alias for --only-section">;
75 "Make a section named <section> with the contents of <file>.">,
76 MetaVarName<"section=file">;
78 defm set_section_alignment
79 : Eq<"set-section-alignment", "Set alignment for a given section.">,
80 MetaVarName<"section=align">;
82 defm set_section_flags
83 : Eq<"set-section-flags",
84 "Set section flags for a given section. Flags supported for GNU "
85 "compatibility: alloc, load, noload, readonly, debug, code, data, "
86 "rom, share, contents, merge, strings.">,
87 MetaVarName<"section=flag1[,flag2,...]">;
89 def S : Flag<["-"], "S">,
91 HelpText<"Alias for --strip-all">;
92 def strip_dwo : Flag<["--"], "strip-dwo">,
93 HelpText<"Remove all DWARF .dwo sections from file">;
95 : Flag<["--"], "strip-non-alloc">,
96 HelpText<"Remove all non-allocated sections outside segments">;
97 defm strip_unneeded_symbol
98 : Eq<"strip-unneeded-symbol",
99 "Remove symbol <symbol> if it is not needed by relocations">,
100 MetaVarName<"symbol">;
101 defm strip_unneeded_symbols
102 : Eq<"strip-unneeded-symbols",
103 "Reads a list of symbols from <filename> and removes them "
104 "if they are not needed by relocations">,
105 MetaVarName<"filename">;
108 : Flag<["--"], "extract-dwo">,
110 "Remove all sections that are not DWARF .dwo sections from file">;
112 defm extract_partition
113 : Eq<"extract-partition", "Extract named partition from input file">,
115 def extract_main_partition
116 : Flag<["--"], "extract-main-partition">,
117 HelpText<"Extract main partition from the input file">;
120 : Flag<["--"], "localize-hidden">,
122 "Mark all symbols that have hidden or internal visibility as local">;
123 defm localize_symbol : Eq<"localize-symbol", "Mark <symbol> as local">,
124 MetaVarName<"symbol">;
125 defm localize_symbols
126 : Eq<"localize-symbols",
127 "Reads a list of symbols from <filename> and marks them local.">,
128 MetaVarName<"filename">;
130 def L : JoinedOrSeparate<["-"], "L">,
131 Alias<localize_symbol>,
132 HelpText<"Alias for --localize-symbol">;
134 defm globalize_symbol : Eq<"globalize-symbol", "Mark <symbol> as global">,
135 MetaVarName<"symbol">;
137 defm globalize_symbols
138 : Eq<"globalize-symbols",
139 "Reads a list of symbols from <filename> and marks them global.">,
140 MetaVarName<"filename">;
142 defm keep_global_symbol
143 : Eq<"keep-global-symbol",
144 "Convert all symbols except <symbol> to local. May be repeated to "
145 "convert all except a set of symbols to local.">,
146 MetaVarName<"symbol">;
147 def G : JoinedOrSeparate<["-"], "G">,
148 Alias<keep_global_symbol>,
149 HelpText<"Alias for --keep-global-symbol">;
151 defm keep_global_symbols
152 : Eq<"keep-global-symbols",
153 "Reads a list of symbols from <filename> and runs as if "
154 "--keep-global-symbol=<symbol> is set for each one. <filename> "
155 "contains one symbol per line and may contain comments beginning with "
156 "'#'. Leading and trailing whitespace is stripped from each line. May "
157 "be repeated to read symbols from many files.">,
158 MetaVarName<"filename">;
160 defm weaken_symbol : Eq<"weaken-symbol", "Mark <symbol> as weak">,
161 MetaVarName<"symbol">;
163 : Eq<"weaken-symbols",
164 "Reads a list of symbols from <filename> and marks them weak.">,
165 MetaVarName<"filename">;
167 def W : JoinedOrSeparate<["-"], "W">,
168 Alias<weaken_symbol>,
169 HelpText<"Alias for --weaken-symbol">;
170 def weaken : Flag<["--"], "weaken">,
171 HelpText<"Mark all global symbols as weak">;
174 : Eq<"strip-symbols",
175 "Reads a list of symbols from <filename> and removes them.">,
176 MetaVarName<"filename">;
180 "Reads a list of symbols from <filename> and runs as if "
181 "--keep-symbol=<symbol> is set for each one. <filename> "
182 "contains one symbol per line and may contain comments beginning with "
183 "'#'. Leading and trailing whitespace is stripped from each line. May "
184 "be repeated to read symbols from many files.">,
185 MetaVarName<"filename">;
189 "Dump contents of section named <section> into file <file>">,
190 MetaVarName<"section=file">;
192 : Eq<"prefix-symbols", "Add <prefix> to the start of every symbol name">,
193 MetaVarName<"prefix">;
195 defm prefix_alloc_sections
196 : Eq<"prefix-alloc-sections", "Add <prefix> to the start of every allocated section name">,
197 MetaVarName<"prefix">;
199 defm build_id_link_dir
200 : Eq<"build-id-link-dir", "Set directory for --build-id-link-input and "
201 "--build-id-link-output to <dir>">,
203 defm build_id_link_input
204 : Eq<"build-id-link-input", "Hard-link the input to <dir>/xx/xxx<suffix> "
205 "name derived from hex build ID">,
206 MetaVarName<"suffix">;
207 defm build_id_link_output
208 : Eq<"build-id-link-output", "Hard-link the output to <dir>/xx/xxx<suffix> "
209 "name derived from hex build ID">,
210 MetaVarName<"suffix">;
212 defm set_start : Eq<"set-start", "Set the start address to <addr>. Overrides "
213 "any previous --change-start or --adjust-start values.">,
215 defm change_start : Eq<"change-start", "Add <incr> to the start address. Can be "
216 "specified multiple times, all values will be applied "
219 def adjust_start : JoinedOrSeparate<["--"], "adjust-start">,
221 HelpText<"Alias for --change-start">;
224 : Eq<"add-symbol", "Add new symbol <name> to .symtab. Accepted flags: "
225 "global, local, weak, default, hidden, protected, file, section, object, "
226 "function, indirect-function. Accepted but ignored for "
227 "compatibility: debug, constructor, warning, indirect, synthetic, "
228 "unique-object, before.">,
229 MetaVarName<"name=[section:]value[,flags]">;