18bcb0991SDimitry Andricinclude "CommonOpts.td" 20b57cec5SDimitry Andric 30b57cec5SDimitry Andricdefm binary_architecture 48bcb0991SDimitry Andric : Eq<"binary-architecture", "Ignored for compatibility">; 58bcb0991SDimitry Andricdef B : JoinedOrSeparate<["-"], "B">, 68bcb0991SDimitry Andric Alias<binary_architecture>, 78bcb0991SDimitry Andric HelpText<"Alias for --binary-architecture">; 80b57cec5SDimitry Andric 90b57cec5SDimitry Andricdefm target : Eq<"target", "Format of the input and output file">, 100b57cec5SDimitry Andric Values<"binary">; 118bcb0991SDimitry Andricdef F : JoinedOrSeparate<["-"], "F">, 128bcb0991SDimitry Andric Alias<target>, 138bcb0991SDimitry Andric HelpText<"Alias for --target">; 140b57cec5SDimitry Andric 150b57cec5SDimitry Andricdefm input_target : Eq<"input-target", "Format of the input file">, 160b57cec5SDimitry Andric Values<"binary">; 178bcb0991SDimitry Andricdef I : JoinedOrSeparate<["-"], "I">, 188bcb0991SDimitry Andric Alias<input_target>, 198bcb0991SDimitry Andric HelpText<"Alias for --input-target">; 200b57cec5SDimitry Andric 210b57cec5SDimitry Andricdefm output_target : Eq<"output-target", "Format of the output file">, 220b57cec5SDimitry Andric Values<"binary">; 238bcb0991SDimitry Andricdef O : JoinedOrSeparate<["-"], "O">, 248bcb0991SDimitry Andric Alias<output_target>, 258bcb0991SDimitry Andric HelpText<"Alias for --output-target">; 268bcb0991SDimitry Andric 278bcb0991SDimitry Andricdefm new_symbol_visibility : Eq<"new-symbol-visibility", "Visibility of " 288bcb0991SDimitry Andric "symbols generated for binary input or added" 298bcb0991SDimitry Andric " with --add-symbol unless otherwise" 308bcb0991SDimitry Andric " specified. The default value is 'default'.">; 310b57cec5SDimitry Andric 320b57cec5SDimitry Andricdef compress_debug_sections : Flag<["--"], "compress-debug-sections">; 330b57cec5SDimitry Andricdef compress_debug_sections_eq 340b57cec5SDimitry Andric : Joined<["--"], "compress-debug-sections=">, 350b57cec5SDimitry Andric MetaVarName<"[ zlib | zlib-gnu ]">, 360b57cec5SDimitry Andric HelpText<"Compress DWARF debug sections using specified style. Supported " 370b57cec5SDimitry Andric "styles: 'zlib-gnu' and 'zlib'">; 380b57cec5SDimitry Andricdef decompress_debug_sections : Flag<["--"], "decompress-debug-sections">, 390b57cec5SDimitry Andric HelpText<"Decompress DWARF debug sections.">; 400b57cec5SDimitry Andricdefm split_dwo 410b57cec5SDimitry Andric : Eq<"split-dwo", "Equivalent to extract-dwo on the input file to " 420b57cec5SDimitry Andric "<dwo-file>, then strip-dwo on the input file">, 430b57cec5SDimitry Andric MetaVarName<"dwo-file">; 440b57cec5SDimitry Andric 450b57cec5SDimitry Andricdefm add_gnu_debuglink 460b57cec5SDimitry Andric : Eq<"add-gnu-debuglink", "Add a .gnu_debuglink for <debug-file>">, 470b57cec5SDimitry Andric MetaVarName<"debug-file">; 480b57cec5SDimitry Andric 490b57cec5SDimitry Andricdefm rename_section 500b57cec5SDimitry Andric : Eq<"rename-section", 510b57cec5SDimitry Andric "Renames a section from old to new, optionally with specified flags. " 520b57cec5SDimitry Andric "Flags supported for GNU compatibility: alloc, load, noload, " 53349cc55cSDimitry Andric "readonly, exclude, debug, code, data, rom, share, contents, merge, " 54349cc55cSDimitry Andric "strings.">, 550b57cec5SDimitry Andric MetaVarName<"old=new[,flag1,...]">; 560b57cec5SDimitry Andricdefm redefine_symbol 570b57cec5SDimitry Andric : Eq<"redefine-sym", "Change the name of a symbol old to new">, 580b57cec5SDimitry Andric MetaVarName<"old=new">; 590b57cec5SDimitry Andricdefm redefine_symbols 600b57cec5SDimitry Andric : Eq<"redefine-syms", 610b57cec5SDimitry Andric "Reads a list of symbol pairs from <filename> and runs as if " 620b57cec5SDimitry Andric "--redefine-sym=<old>=<new> is set for each one. <filename> " 630b57cec5SDimitry Andric "contains two symbols per line separated with whitespace and may " 640b57cec5SDimitry Andric "contain comments beginning with '#'. Leading and trailing " 650b57cec5SDimitry Andric "whitespace is stripped from each line. May be repeated to read " 660b57cec5SDimitry Andric "symbols from many files.">, 670b57cec5SDimitry Andric MetaVarName<"filename">; 680b57cec5SDimitry Andric 690b57cec5SDimitry Andricdefm only_section : Eq<"only-section", "Remove all but <section>">, 700b57cec5SDimitry Andric MetaVarName<"section">; 718bcb0991SDimitry Andricdef j : JoinedOrSeparate<["-"], "j">, 728bcb0991SDimitry Andric Alias<only_section>, 738bcb0991SDimitry Andric HelpText<"Alias for --only-section">; 740b57cec5SDimitry Andricdefm add_section 750b57cec5SDimitry Andric : Eq<"add-section", 760b57cec5SDimitry Andric "Make a section named <section> with the contents of <file>.">, 770b57cec5SDimitry Andric MetaVarName<"section=file">; 780b57cec5SDimitry Andric 798bcb0991SDimitry Andricdefm set_section_alignment 808bcb0991SDimitry Andric : Eq<"set-section-alignment", "Set alignment for a given section.">, 818bcb0991SDimitry Andric MetaVarName<"section=align">; 828bcb0991SDimitry Andric 830b57cec5SDimitry Andricdefm set_section_flags 840b57cec5SDimitry Andric : Eq<"set-section-flags", 850b57cec5SDimitry Andric "Set section flags for a given section. Flags supported for GNU " 86349cc55cSDimitry Andric "compatibility: alloc, load, noload, readonly, exclude, debug, code, " 87349cc55cSDimitry Andric "data, rom, share, contents, merge, strings.">, 880b57cec5SDimitry Andric MetaVarName<"section=flag1[,flag2,...]">; 890b57cec5SDimitry Andric 908bcb0991SDimitry Andricdef S : Flag<["-"], "S">, 918bcb0991SDimitry Andric Alias<strip_all>, 928bcb0991SDimitry Andric HelpText<"Alias for --strip-all">; 930b57cec5SDimitry Andricdef strip_dwo : Flag<["--"], "strip-dwo">, 940b57cec5SDimitry Andric HelpText<"Remove all DWARF .dwo sections from file">; 950b57cec5SDimitry Andricdef strip_non_alloc 960b57cec5SDimitry Andric : Flag<["--"], "strip-non-alloc">, 970b57cec5SDimitry Andric HelpText<"Remove all non-allocated sections outside segments">; 980b57cec5SDimitry Andricdefm strip_unneeded_symbol 990b57cec5SDimitry Andric : Eq<"strip-unneeded-symbol", 1000b57cec5SDimitry Andric "Remove symbol <symbol> if it is not needed by relocations">, 1010b57cec5SDimitry Andric MetaVarName<"symbol">; 1020b57cec5SDimitry Andricdefm strip_unneeded_symbols 1030b57cec5SDimitry Andric : Eq<"strip-unneeded-symbols", 1040b57cec5SDimitry Andric "Reads a list of symbols from <filename> and removes them " 1050b57cec5SDimitry Andric "if they are not needed by relocations">, 1060b57cec5SDimitry Andric MetaVarName<"filename">; 1070b57cec5SDimitry Andric 108*04eeddc0SDimitry Andricdefm subsystem 109*04eeddc0SDimitry Andric : Eq<"subsystem", 110*04eeddc0SDimitry Andric "Set PE subsystem and version">, 111*04eeddc0SDimitry Andric MetaVarName<"name[:version]">; 112*04eeddc0SDimitry Andric 1130b57cec5SDimitry Andricdef extract_dwo 1140b57cec5SDimitry Andric : Flag<["--"], "extract-dwo">, 1150b57cec5SDimitry Andric HelpText< 1160b57cec5SDimitry Andric "Remove all sections that are not DWARF .dwo sections from file">; 1170b57cec5SDimitry Andric 1180b57cec5SDimitry Andricdefm extract_partition 1190b57cec5SDimitry Andric : Eq<"extract-partition", "Extract named partition from input file">, 1200b57cec5SDimitry Andric MetaVarName<"name">; 1210b57cec5SDimitry Andricdef extract_main_partition 1220b57cec5SDimitry Andric : Flag<["--"], "extract-main-partition">, 1230b57cec5SDimitry Andric HelpText<"Extract main partition from the input file">; 1240b57cec5SDimitry Andric 1250b57cec5SDimitry Andricdef localize_hidden 1260b57cec5SDimitry Andric : Flag<["--"], "localize-hidden">, 1270b57cec5SDimitry Andric HelpText< 1280b57cec5SDimitry Andric "Mark all symbols that have hidden or internal visibility as local">; 1290b57cec5SDimitry Andricdefm localize_symbol : Eq<"localize-symbol", "Mark <symbol> as local">, 1300b57cec5SDimitry Andric MetaVarName<"symbol">; 1310b57cec5SDimitry Andricdefm localize_symbols 1320b57cec5SDimitry Andric : Eq<"localize-symbols", 1330b57cec5SDimitry Andric "Reads a list of symbols from <filename> and marks them local.">, 1340b57cec5SDimitry Andric MetaVarName<"filename">; 1350b57cec5SDimitry Andric 1368bcb0991SDimitry Andricdef L : JoinedOrSeparate<["-"], "L">, 1378bcb0991SDimitry Andric Alias<localize_symbol>, 1388bcb0991SDimitry Andric HelpText<"Alias for --localize-symbol">; 1390b57cec5SDimitry Andric 1400b57cec5SDimitry Andricdefm globalize_symbol : Eq<"globalize-symbol", "Mark <symbol> as global">, 1410b57cec5SDimitry Andric MetaVarName<"symbol">; 1420b57cec5SDimitry Andric 1430b57cec5SDimitry Andricdefm globalize_symbols 1440b57cec5SDimitry Andric : Eq<"globalize-symbols", 1450b57cec5SDimitry Andric "Reads a list of symbols from <filename> and marks them global.">, 1460b57cec5SDimitry Andric MetaVarName<"filename">; 1470b57cec5SDimitry Andric 1480b57cec5SDimitry Andricdefm keep_global_symbol 1490b57cec5SDimitry Andric : Eq<"keep-global-symbol", 1500b57cec5SDimitry Andric "Convert all symbols except <symbol> to local. May be repeated to " 1510b57cec5SDimitry Andric "convert all except a set of symbols to local.">, 1520b57cec5SDimitry Andric MetaVarName<"symbol">; 1538bcb0991SDimitry Andricdef G : JoinedOrSeparate<["-"], "G">, 1548bcb0991SDimitry Andric Alias<keep_global_symbol>, 1558bcb0991SDimitry Andric HelpText<"Alias for --keep-global-symbol">; 1560b57cec5SDimitry Andric 1570b57cec5SDimitry Andricdefm keep_global_symbols 1580b57cec5SDimitry Andric : Eq<"keep-global-symbols", 1590b57cec5SDimitry Andric "Reads a list of symbols from <filename> and runs as if " 1600b57cec5SDimitry Andric "--keep-global-symbol=<symbol> is set for each one. <filename> " 1610b57cec5SDimitry Andric "contains one symbol per line and may contain comments beginning with " 1620b57cec5SDimitry Andric "'#'. Leading and trailing whitespace is stripped from each line. May " 1630b57cec5SDimitry Andric "be repeated to read symbols from many files.">, 1640b57cec5SDimitry Andric MetaVarName<"filename">; 1650b57cec5SDimitry Andric 1660b57cec5SDimitry Andricdefm weaken_symbol : Eq<"weaken-symbol", "Mark <symbol> as weak">, 1670b57cec5SDimitry Andric MetaVarName<"symbol">; 1680b57cec5SDimitry Andricdefm weaken_symbols 1690b57cec5SDimitry Andric : Eq<"weaken-symbols", 1700b57cec5SDimitry Andric "Reads a list of symbols from <filename> and marks them weak.">, 1710b57cec5SDimitry Andric MetaVarName<"filename">; 1720b57cec5SDimitry Andric 1738bcb0991SDimitry Andricdef W : JoinedOrSeparate<["-"], "W">, 1748bcb0991SDimitry Andric Alias<weaken_symbol>, 1758bcb0991SDimitry Andric HelpText<"Alias for --weaken-symbol">; 1760b57cec5SDimitry Andricdef weaken : Flag<["--"], "weaken">, 1770b57cec5SDimitry Andric HelpText<"Mark all global symbols as weak">; 1780b57cec5SDimitry Andric 1790b57cec5SDimitry Andricdefm strip_symbols 1800b57cec5SDimitry Andric : Eq<"strip-symbols", 1810b57cec5SDimitry Andric "Reads a list of symbols from <filename> and removes them.">, 1820b57cec5SDimitry Andric MetaVarName<"filename">; 1830b57cec5SDimitry Andric 1840b57cec5SDimitry Andricdefm keep_symbols 1850b57cec5SDimitry Andric : Eq<"keep-symbols", 1860b57cec5SDimitry Andric "Reads a list of symbols from <filename> and runs as if " 1870b57cec5SDimitry Andric "--keep-symbol=<symbol> is set for each one. <filename> " 1880b57cec5SDimitry Andric "contains one symbol per line and may contain comments beginning with " 1890b57cec5SDimitry Andric "'#'. Leading and trailing whitespace is stripped from each line. May " 1900b57cec5SDimitry Andric "be repeated to read symbols from many files.">, 1910b57cec5SDimitry Andric MetaVarName<"filename">; 1920b57cec5SDimitry Andric 1930b57cec5SDimitry Andricdefm dump_section 1940b57cec5SDimitry Andric : Eq<"dump-section", 1950b57cec5SDimitry Andric "Dump contents of section named <section> into file <file>">, 1960b57cec5SDimitry Andric MetaVarName<"section=file">; 1970b57cec5SDimitry Andricdefm prefix_symbols 1980b57cec5SDimitry Andric : Eq<"prefix-symbols", "Add <prefix> to the start of every symbol name">, 1990b57cec5SDimitry Andric MetaVarName<"prefix">; 2000b57cec5SDimitry Andric 2010b57cec5SDimitry Andricdefm prefix_alloc_sections 2020b57cec5SDimitry Andric : Eq<"prefix-alloc-sections", "Add <prefix> to the start of every allocated section name">, 2030b57cec5SDimitry Andric MetaVarName<"prefix">; 2040b57cec5SDimitry Andric 2050b57cec5SDimitry Andricdefm set_start : Eq<"set-start", "Set the start address to <addr>. Overrides " 2060b57cec5SDimitry Andric "any previous --change-start or --adjust-start values.">, 2070b57cec5SDimitry Andric MetaVarName<"addr">; 2080b57cec5SDimitry Andricdefm change_start : Eq<"change-start", "Add <incr> to the start address. Can be " 2090b57cec5SDimitry Andric "specified multiple times, all values will be applied " 2100b57cec5SDimitry Andric "cumulatively.">, 2110b57cec5SDimitry Andric MetaVarName<"incr">; 2120b57cec5SDimitry Andricdef adjust_start : JoinedOrSeparate<["--"], "adjust-start">, 2138bcb0991SDimitry Andric Alias<change_start>, 2148bcb0991SDimitry Andric HelpText<"Alias for --change-start">; 2150b57cec5SDimitry Andric 2160b57cec5SDimitry Andricdefm add_symbol 2170b57cec5SDimitry Andric : Eq<"add-symbol", "Add new symbol <name> to .symtab. Accepted flags: " 2188bcb0991SDimitry Andric "global, local, weak, default, hidden, protected, file, section, object, " 2190b57cec5SDimitry Andric "function, indirect-function. Accepted but ignored for " 2200b57cec5SDimitry Andric "compatibility: debug, constructor, warning, indirect, synthetic, " 2210b57cec5SDimitry Andric "unique-object, before.">, 2220b57cec5SDimitry Andric MetaVarName<"name=[section:]value[,flags]">; 223349cc55cSDimitry Andric 224349cc55cSDimitry Andricdefm update_section 225349cc55cSDimitry Andric : Eq<"update-section", "Add section <name> with contents from a file <file>.">, 226349cc55cSDimitry Andric MetaVarName<"name=file">; 227