* elf-bfd.h (struct elf_obj_tdata): Move find_line_info, local_stubs,
[binutils-gdb.git] / gold / options.h
index b5df3ebf2af7b92f17f1af9738c1de4446589aaa..66fcf3eec632f13c5b9047b128b99bad52b97a40 100644 (file)
@@ -498,6 +498,32 @@ struct Struct_special : public Struct_var
   };                                                                   \
   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
@@ -739,6 +765,9 @@ class General_options
               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);
 
@@ -875,6 +904,11 @@ class General_options
   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);
@@ -886,6 +920,10 @@ class General_options
   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"),
@@ -897,7 +935,7 @@ class General_options
              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"));
 
@@ -929,6 +967,18 @@ class General_options
   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"));
@@ -936,6 +986,11 @@ class General_options
                  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);
 
@@ -999,14 +1054,15 @@ class General_options
               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,
@@ -1083,6 +1139,17 @@ class General_options
                 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"));
@@ -1166,6 +1233,10 @@ class General_options
   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,