}; \
Struct_no_##option__ no_##option__##_initializer_
+// This is like DEFINE_uint64, but VARNAME is the name of a different
+// option. This option becomes an alias for that one.
+#define DEFINE_uint64_alias(option__, varname__, dashes__, shortname__, \
+ helpstring__, helparg__) \
+ private: \
+ struct Struct_##option__ : public options::Struct_var \
+ { \
+ Struct_##option__() \
+ : option(#option__, dashes__, shortname__, "", helpstring__, \
+ helparg__, false, this) \
+ { } \
+ \
+ void \
+ parse_to_value(const char* option_name, const char* arg, \
+ Command_line*, General_options* options) \
+ { \
+ uint64_t value; \
+ options::parse_uint64(option_name, arg, &value); \
+ options->set_##varname__(value); \
+ options->set_user_set_##varname__(); \
+ } \
+ \
+ options::One_option option; \
+ }; \
+ Struct_##option__ option__##_;
+
// This is used for non-standard flags. It defines no functions; it
// just calls General_options::parse_VARNAME whenever the flag is
// seen. We declare parse_VARNAME as a static member of
{ }
// This is the usual constructor.
- Search_directory(const char* name, bool put_in_sysroot)
+ Search_directory(const std::string& name, bool put_in_sysroot)
: name_(name), put_in_sysroot_(put_in_sysroot), is_in_sysroot_(false)
{
if (this->name_.empty())
N_("Export all dynamic symbols"),
N_("Do not export all dynamic symbols (default)"));
+ DEFINE_set(export_dynamic_symbol, options::TWO_DASHES, '\0',
+ N_("Export SYMBOL to dynamic symbol table"), N_("SYMBOL"));
+
DEFINE_special(EB, options::ONE_DASH, '\0',
N_("Link big-endian objects."), NULL);
DEFINE_bool(g, options::EXACTLY_ONE_DASH, '\0', false,
N_("Ignored"), NULL);
+ DEFINE_bool(gdb_index, options::TWO_DASHES, '\0', false,
+ N_("Generate .gdb_index section"),
+ N_("Do not generate .gdb_index section"));
+
DEFINE_bool(gnu_unique, options::TWO_DASHES, '\0', true,
N_("Enable STB_GNU_UNIQUE symbol binding (default)"),
N_("Disable STB_GNU_UNIQUE symbol binding"));
DEFINE_dirlist(library_path, options::TWO_DASHES, 'L',
N_("Add directory to search path"), N_("DIR"));
+ DEFINE_bool(text_reorder, options::TWO_DASHES, '\0', true,
+ N_("Enable text section reordering for GCC section names "
+ "(default)"),
+ N_("Disable text section reordering for GCC section names"));
+
DEFINE_bool(nostdlib, options::ONE_DASH, '\0', false,
N_(" Only search directories specified on the command line."),
NULL);
DEFINE_string(m, options::EXACTLY_ONE_DASH, 'm', "",
N_("Set GNU linker emulation; obsolete"), N_("EMULATION"));
+ DEFINE_bool(mmap_output_file, options::TWO_DASHES, '\0', true,
+ N_("Map the output file for writing (default)."),
+ N_("Do not map the output file for writing."));
+
DEFINE_bool(print_map, options::TWO_DASHES, 'M', false,
N_("Write map file on standard output"), NULL);
DEFINE_string(Map, options::ONE_DASH, '\0', NULL, N_("Write map file"),
N_("Do not page align data, do not make text readonly"),
N_("Page align data, make text readonly"));
- DEFINE_enable(new_dtags, options::EXACTLY_TWO_DASHES, '\0', false,
+ DEFINE_enable(new_dtags, options::EXACTLY_TWO_DASHES, '\0', true,
N_("Enable use of DT_RUNPATH and DT_FLAGS"),
N_("Disable use of DT_RUNPATH and DT_FLAGS"));
DEFINE_bool(pipeline_knowledge, options::ONE_DASH, '\0', false,
NULL, N_("(ARM only) Ignore for backward compatibility"));
+ DEFINE_var(plt_align, options::TWO_DASHES, '\0', 0, "5",
+ N_("(PowerPC64 only) Align PLT call stubs to fit cache lines"),
+ N_("[=P2ALIGN]"), true, int, int, options::parse_uint);
+
+ DEFINE_bool(plt_static_chain, options::TWO_DASHES, '\0', false,
+ N_("(PowerPC64 only) PLT call stubs should load r11"),
+ N_("(PowerPC64 only) PLT call stubs should not load r11"));
+
+ DEFINE_bool(plt_thread_safe, options::TWO_DASHES, '\0', false,
+ N_("(PowerPC64 only) PLT call stubs with load-load barrier"),
+ N_("(PowerPC64 only) PLT call stubs without barrier"));
+
#ifdef ENABLE_PLUGINS
DEFINE_special(plugin, options::TWO_DASHES, '\0',
N_("Load a plugin library"), N_("PLUGIN"));
N_("Pass an option to the plugin"), N_("OPTION"));
#endif
+ DEFINE_bool(posix_fallocate, options::TWO_DASHES, '\0', true,
+ N_("Use posix_fallocate to reserve space in the output file"
+ " (default)."),
+ N_("Use fallocate or ftruncate to reserve space."));
+
DEFINE_bool(preread_archive_symbols, options::TWO_DASHES, '\0', false,
N_("Preread archive symbols when multi-threaded"), NULL);
N_("Emit only debug line number information"), NULL);
DEFINE_bool(strip_debug_gdb, options::TWO_DASHES, '\0', false,
N_("Strip debug symbols that are unused by gdb "
- "(at least versions <= 6.7)"), NULL);
+ "(at least versions <= 7.4)"), NULL);
DEFINE_bool(strip_lto_sections, options::TWO_DASHES, '\0', true,
N_("Strip LTO intermediate code sections"), NULL);
DEFINE_int(stub_group_size, options::TWO_DASHES , '\0', 1,
- N_("(ARM only) The maximum distance from instructions in a group "
- "of sections to their stubs. Negative values mean stubs "
- "are always after the group. 1 means using default size.\n"),
+ N_("(ARM, PowerPC only) The maximum distance from instructions "
+ "in a group of sections to their stubs. Negative values mean "
+ "stubs are always after (PowerPC before) the group. 1 means "
+ "use default size.\n"),
N_("SIZE"));
DEFINE_bool(no_keep_memory, options::TWO_DASHES, '\0', false,
N_("Set the address of the data segment"), N_("ADDRESS"));
DEFINE_uint64(Ttext, options::ONE_DASH, '\0', -1U,
N_("Set the address of the text segment"), N_("ADDRESS"));
+ DEFINE_uint64_alias(Ttext_segment, Ttext, options::ONE_DASH, '\0',
+ N_("Set the address of the text segment"),
+ N_("ADDRESS"));
+
+ DEFINE_bool(toc_optimize, options::TWO_DASHES, '\0', true,
+ N_("(PowerPC64 only) Optimize TOC code sequences"),
+ N_("(PowerPC64 only) Don't optimize TOC code sequences"));
+
+ DEFINE_bool(toc_sort, options::TWO_DASHES, '\0', true,
+ N_("(PowerPC64 only) Sort TOC and GOT sections"),
+ N_("(PowerPC64 only) Don't sort TOC and GOT sections"));
DEFINE_set(undefined, options::TWO_DASHES, 'u',
N_("Create undefined reference to SYMBOL"), N_("SYMBOL"));
DEFINE_special(end_lib, options::TWO_DASHES, '\0',
N_("End a library "), NULL);
+ DEFINE_string(fuse_ld, options::ONE_DASH, '\0', "",
+ N_("Ignored for GCC linker option compatibility"),
+ "");
+
// The -z options.
DEFINE_bool(combreloc, options::DASH_Z, '\0', true,
// These are called by finalize() to set up the search-path correctly.
void
- add_to_library_path_with_sysroot(const char* arg)
+ add_to_library_path_with_sysroot(const std::string& arg)
{ this->add_search_directory_to_library_path(Search_directory(arg, true)); }
// Apply any sysroot to the directory lists.