gas: avoid spurious failures in non-ELF targets in the SPARC testsuite.
[deliverable/binutils-gdb.git] / gold / options.h
index 005582690c9ec64e323e419e7cc847f048d28d56..23c9658be3ae4e2d6fd447316d8a17bfb7140821 100644 (file)
@@ -1,7 +1,6 @@
 // options.h -- handle command line options for gold  -*- C++ -*-
 
-// Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2013
-// Free Software Foundation, Inc.
+// Copyright (C) 2006-2016 Free Software Foundation, Inc.
 // Written by Ian Lance Taylor <iant@google.com>.
 
 // This file is part of gold.
@@ -645,6 +644,11 @@ class General_options
              N_("Allow unresolved references in shared libraries"),
              N_("Do not allow unresolved references in shared libraries"));
 
+  DEFINE_bool(apply_dynamic_relocs, options::TWO_DASHES, '\0', true,
+             N_("Apply link-time values for dynamic relocations (default)"),
+             N_("(aarch64 only) Do not apply link-time values "
+                "for dynamic relocations"));
+
   DEFINE_bool(as_needed, options::TWO_DASHES, '\0', false,
              N_("Only set DT_NEEDED for shared libraries if used"),
              N_("Always DT_NEEDED for shared libraries"));
@@ -696,17 +700,10 @@ class General_options
              N_("Check segment addresses for overlaps (default)"),
              N_("Do not check segment addresses for overlaps"));
 
-#ifdef HAVE_ZLIB_H
-  DEFINE_enum(compress_debug_sections, options::TWO_DASHES, '\0', "none",
-             N_("Compress .debug_* sections in the output file"),
-             ("[none,zlib]"),
-             {"none", "zlib"});
-#else
   DEFINE_enum(compress_debug_sections, options::TWO_DASHES, '\0', "none",
              N_("Compress .debug_* sections in the output file"),
-             N_("[none]"),
-             {"none"});
-#endif
+             ("[none,zlib,zlib-gnu,zlib-gabi]"),
+             {"none", "zlib", "zlib-gnu", "zlib-gabi"});
 
   DEFINE_bool(copy_dt_needed_entries, options::TWO_DASHES, '\0', false,
              N_("Not supported"),
@@ -747,10 +744,12 @@ class General_options
              N_("Look for violations of the C++ One Definition Rule"),
              N_("Do not look for violations of the C++ One Definition Rule"));
 
-  DEFINE_bool(discard_all, options::TWO_DASHES, 'x', false,
-             N_("Delete all local symbols"), NULL);
-  DEFINE_bool(discard_locals, options::TWO_DASHES, 'X', false,
-             N_("Delete all temporary local symbols"), NULL);
+  DEFINE_special(discard_all, options::TWO_DASHES, 'x',
+                N_("Delete all local symbols"), NULL);
+  DEFINE_special(discard_locals, options::TWO_DASHES, 'X',
+                N_("Delete all temporary local symbols"), NULL);
+  DEFINE_special(discard_none, options::TWO_DASHES, '\0',
+                N_("Keep all local symbols"), NULL);
 
   DEFINE_bool(dynamic_list_data, options::TWO_DASHES, '\0', false,
              N_("Add data symbols to dynamic symbols"), NULL);
@@ -810,6 +809,14 @@ class General_options
              N_("(ARM only) Fix binaries for Cortex-A8 erratum."),
              N_("(ARM only) Do not fix binaries for Cortex-A8 erratum."));
 
+  DEFINE_bool(fix_cortex_a53_843419, options::TWO_DASHES, '\0', false,
+             N_("(AArch64 only) Fix Cortex-A53 erratum 843419."),
+             N_("(AArch64 only) Do not fix Cortex-A53 erratum 843419."));
+
+  DEFINE_bool(fix_cortex_a53_835769, options::TWO_DASHES, '\0', false,
+             N_("(AArch64 only) Fix Cortex-A53 erratum 835769."),
+             N_("(AArch64 only) Do not fix Cortex-A53 erratum 835769."));
+
   DEFINE_bool(fix_arm1176, options::TWO_DASHES, '\0', true,
              N_("(ARM only) Fix binaries for ARM1176 erratum."),
              N_("(ARM only) Do not fix binaries for ARM1176 erratum."));
@@ -827,6 +834,10 @@ class General_options
                    "veneer"),
                 NULL);
 
+  DEFINE_bool(long_plt, options::TWO_DASHES, '\0', false,
+             N_("(ARM only) Generate long PLT entries"),
+             N_("(ARM only) Do not generate long PLT entries"));
+
   DEFINE_bool(g, options::EXACTLY_ONE_DASH, '\0', false,
              N_("Ignored"), NULL);
 
@@ -973,11 +984,17 @@ class General_options
              N_("(ARM only) Ignore for backward compatibility"), NULL);
 
   DEFINE_bool(pie, options::ONE_DASH, '\0', false,
-             N_("Create a position independent executable"), NULL);
+             N_("Create a position independent executable"),
+             N_("Do not create a position independent executable"));
   DEFINE_bool_alias(pic_executable, pie, options::TWO_DASHES, '\0',
-                   N_("Create a position independent executable"), NULL,
+                   N_("Create a position independent executable"),
+                   N_("Do not create a position independent executable"),
                    false);
 
+  DEFINE_bool(pic_veneer, options::TWO_DASHES, '\0', false,
+             N_("Force PIC sequences for ARM/Thumb interworking veneers"),
+             NULL);
+
   DEFINE_bool(pipeline_knowledge, options::ONE_DASH, '\0', false,
              NULL, N_("(ARM only) Ignore for backward compatibility"));
 
@@ -1056,6 +1073,12 @@ class General_options
                         N_("Sort common symbols by alignment"),
                         N_("[={ascending,descending}]"));
 
+  DEFINE_enum(sort_section, options::TWO_DASHES, '\0', "none",
+             N_("Sort sections by name.  \'--no-text-reorder\'"
+                " will override \'--sort-section=name\' for .text"),
+             N_("[none,name]"),
+             {"none", "name"});
+
   DEFINE_uint(spare_dynamic_tags, options::TWO_DASHES, '\0', 5,
              N_("Dynamic tag slots to reserve (default 5)"),
              N_("COUNT"));
@@ -1156,6 +1179,8 @@ class General_options
   DEFINE_uint64_alias(Ttext_segment, Ttext, options::ONE_DASH, '\0',
                      N_("Set the address of the text segment"),
                      N_("ADDRESS"));
+  DEFINE_uint64(Trodata_segment, options::ONE_DASH, '\0', -1U,
+               N_("Set the address of the rodata segment"), N_("ADDRESS"));
 
   DEFINE_bool(toc_optimize, options::TWO_DASHES, '\0', true,
              N_("(PowerPC64 only) Optimize TOC code sequences"),
@@ -1213,6 +1238,9 @@ class General_options
                    options::TWO_DASHES, '\0',
                    N_("Report unresolved symbols as errors"),
                    NULL, true);
+  DEFINE_bool(weak_unresolved_symbols, options::TWO_DASHES, '\0', false,
+             N_("Convert unresolved symbols to weak references"),
+             NULL);
 
   DEFINE_bool(wchar_size_warning, options::TWO_DASHES, '\0', true, NULL,
              N_("(ARM only) Do not warn about objects with incompatible "
@@ -1263,6 +1291,9 @@ class General_options
              NULL);
   DEFINE_bool(execstack, options::DASH_Z, '\0', false,
              N_("Mark output as requiring executable stack"), NULL);
+  DEFINE_bool(global, options::DASH_Z, '\0', false,
+             N_("Make symbols in DSO available for subsequently loaded "
+                "objects"), NULL);
   DEFINE_bool(initfirst, options::DASH_Z, '\0', false,
              N_("Mark DSO to be initialized first at runtime"),
              NULL);
@@ -1305,7 +1336,7 @@ class General_options
   DEFINE_bool(origin, options::DASH_Z, '\0', false,
              N_("Mark DSO to indicate that needs immediate $ORIGIN "
                 "processing at runtime"), NULL);
-  DEFINE_bool(relro, options::DASH_Z, '\0', false,
+  DEFINE_bool(relro, options::DASH_Z, '\0', DEFAULT_LD_Z_RELRO,
              N_("Where possible mark variables read-only after relocation"),
              N_("Don't mark variables read-only after relocation"));
   DEFINE_bool(text, options::DASH_Z, '\0', false,
@@ -1430,6 +1461,11 @@ class General_options
   in_dynamic_list(const char* symbol) const
   { return this->dynamic_list_.version_script_info()->symbol_is_local(symbol); }
 
+  // True if a --dynamic-list script was provided.
+  bool
+  have_dynamic_list() const
+  { return this->have_dynamic_list_; }
+
   // Finalize the dynamic list.
   void
   finalize_dynamic_list()
@@ -1508,11 +1544,36 @@ class General_options
   endianness() const
   { return this->endianness_; }
 
+  bool
+  discard_all() const
+  { return this->discard_locals_ == DISCARD_ALL; }
+
+  bool
+  discard_locals() const
+  { return this->discard_locals_ == DISCARD_LOCALS; }
+
+  bool
+  discard_sec_merge() const
+  { return this->discard_locals_ == DISCARD_SEC_MERGE; }
+
  private:
   // Don't copy this structure.
   General_options(const General_options&);
   General_options& operator=(const General_options&);
 
+  // What local symbols to discard.
+  enum Discard_locals
+  {
+    // Locals in merge sections (default).
+    DISCARD_SEC_MERGE,
+    // None (--discard-none).
+    DISCARD_NONE,
+    // Temporary locals (--discard-locals/-X).
+    DISCARD_LOCALS,
+    // All locals (--discard-all/-x).
+    DISCARD_ALL
+  };
+
   // Whether to mark the stack as executable.
   enum Execstack
   {
@@ -1583,6 +1644,8 @@ class General_options
   // script.cc, we store this as a Script_options object, even though
   // we only use a single Version_tree from it.
   Script_options dynamic_list_;
+  // Whether a --dynamic-list file was provided.
+  bool have_dynamic_list_;
   // The incremental linking mode.
   Incremental_mode incremental_mode_;
   // The disposition given by the --incremental-changed,
@@ -1606,6 +1669,8 @@ class General_options
   Fix_v4bx fix_v4bx_;
   // Endianness.
   Endianness endianness_;
+  // What local symbols to discard.
+  Discard_locals discard_locals_;
 };
 
 // The position-dependent options.  We use this to store the state of
This page took 0.027067 seconds and 4 git commands to generate.