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_flags
79 : Eq<"set-section-flags",
80 "Set section flags for a given section. Flags supported for GNU "
81 "compatibility: alloc, load, noload, readonly, debug, code, data, "
82 "rom, share, contents, merge, strings.">,
83 MetaVarName<"section=flag1[,flag2,...]">;
85 def S : Flag<["-"], "S">,
87 HelpText<"Alias for --strip-all">;
88 def strip_dwo : Flag<["--"], "strip-dwo">,
89 HelpText<"Remove all DWARF .dwo sections from file">;
91 : Flag<["--"], "strip-non-alloc">,
92 HelpText<"Remove all non-allocated sections outside segments">;
93 defm strip_unneeded_symbol
94 : Eq<"strip-unneeded-symbol",
95 "Remove symbol <symbol> if it is not needed by relocations">,
96 MetaVarName<"symbol">;
97 defm strip_unneeded_symbols
98 : Eq<"strip-unneeded-symbols",
99 "Reads a list of symbols from <filename> and removes them "
100 "if they are not needed by relocations">,
101 MetaVarName<"filename">;
104 : Flag<["--"], "extract-dwo">,
106 "Remove all sections that are not DWARF .dwo sections from file">;
108 defm extract_partition
109 : Eq<"extract-partition", "Extract named partition from input file">,
111 def extract_main_partition
112 : Flag<["--"], "extract-main-partition">,
113 HelpText<"Extract main partition from the input file">;
116 : Flag<["--"], "localize-hidden">,
118 "Mark all symbols that have hidden or internal visibility as local">;
119 defm localize_symbol : Eq<"localize-symbol", "Mark <symbol> as local">,
120 MetaVarName<"symbol">;
121 defm localize_symbols
122 : Eq<"localize-symbols",
123 "Reads a list of symbols from <filename> and marks them local.">,
124 MetaVarName<"filename">;
126 def L : JoinedOrSeparate<["-"], "L">,
127 Alias<localize_symbol>,
128 HelpText<"Alias for --localize-symbol">;
130 defm globalize_symbol : Eq<"globalize-symbol", "Mark <symbol> as global">,
131 MetaVarName<"symbol">;
133 defm globalize_symbols
134 : Eq<"globalize-symbols",
135 "Reads a list of symbols from <filename> and marks them global.">,
136 MetaVarName<"filename">;
138 defm keep_global_symbol
139 : Eq<"keep-global-symbol",
140 "Convert all symbols except <symbol> to local. May be repeated to "
141 "convert all except a set of symbols to local.">,
142 MetaVarName<"symbol">;
143 def G : JoinedOrSeparate<["-"], "G">,
144 Alias<keep_global_symbol>,
145 HelpText<"Alias for --keep-global-symbol">;
147 defm keep_global_symbols
148 : Eq<"keep-global-symbols",
149 "Reads a list of symbols from <filename> and runs as if "
150 "--keep-global-symbol=<symbol> is set for each one. <filename> "
151 "contains one symbol per line and may contain comments beginning with "
152 "'#'. Leading and trailing whitespace is stripped from each line. May "
153 "be repeated to read symbols from many files.">,
154 MetaVarName<"filename">;
156 defm weaken_symbol : Eq<"weaken-symbol", "Mark <symbol> as weak">,
157 MetaVarName<"symbol">;
159 : Eq<"weaken-symbols",
160 "Reads a list of symbols from <filename> and marks them weak.">,
161 MetaVarName<"filename">;
163 def W : JoinedOrSeparate<["-"], "W">,
164 Alias<weaken_symbol>,
165 HelpText<"Alias for --weaken-symbol">;
166 def weaken : Flag<["--"], "weaken">,
167 HelpText<"Mark all global symbols as weak">;
170 : Eq<"strip-symbols",
171 "Reads a list of symbols from <filename> and removes them.">,
172 MetaVarName<"filename">;
176 "Reads a list of symbols from <filename> and runs as if "
177 "--keep-symbol=<symbol> is set for each one. <filename> "
178 "contains one symbol per line and may contain comments beginning with "
179 "'#'. Leading and trailing whitespace is stripped from each line. May "
180 "be repeated to read symbols from many files.">,
181 MetaVarName<"filename">;
185 "Dump contents of section named <section> into file <file>">,
186 MetaVarName<"section=file">;
188 : Eq<"prefix-symbols", "Add <prefix> to the start of every symbol name">,
189 MetaVarName<"prefix">;
191 defm prefix_alloc_sections
192 : Eq<"prefix-alloc-sections", "Add <prefix> to the start of every allocated section name">,
193 MetaVarName<"prefix">;
195 defm build_id_link_dir
196 : Eq<"build-id-link-dir", "Set directory for --build-id-link-input and "
197 "--build-id-link-output to <dir>">,
199 defm build_id_link_input
200 : Eq<"build-id-link-input", "Hard-link the input to <dir>/xx/xxx<suffix> "
201 "name derived from hex build ID">,
202 MetaVarName<"suffix">;
203 defm build_id_link_output
204 : Eq<"build-id-link-output", "Hard-link the output to <dir>/xx/xxx<suffix> "
205 "name derived from hex build ID">,
206 MetaVarName<"suffix">;
208 defm set_start : Eq<"set-start", "Set the start address to <addr>. Overrides "
209 "any previous --change-start or --adjust-start values.">,
211 defm change_start : Eq<"change-start", "Add <incr> to the start address. Can be "
212 "specified multiple times, all values will be applied "
215 def adjust_start : JoinedOrSeparate<["--"], "adjust-start">,
217 HelpText<"Alias for --change-start">;
220 : Eq<"add-symbol", "Add new symbol <name> to .symtab. Accepted flags: "
221 "global, local, weak, default, hidden, protected, file, section, object, "
222 "function, indirect-function. Accepted but ignored for "
223 "compatibility: debug, constructor, warning, indirect, synthetic, "
224 "unique-object, before.">,
225 MetaVarName<"name=[section:]value[,flags]">;