Fix problem in aarch64 gold sources uncovered by Coverty - using sizeof on a pointer...
[deliverable/binutils-gdb.git] / gold / options.h
index 75b2f091ad0289436b79cc0264035eb9e3a2cda2..a8b1d46aa1093e742f385eb62ce76d9666bc1024 100644 (file)
@@ -1,6 +1,6 @@
 // options.h -- handle command line options for gold  -*- C++ -*-
 
-// Copyright (C) 2006-2016 Free Software Foundation, Inc.
+// Copyright (C) 2006-2017 Free Software Foundation, Inc.
 // Written by Ian Lance Taylor <iant@google.com>.
 
 // This file is part of gold.
@@ -1072,6 +1072,10 @@ class General_options
   DEFINE_uint(optimize, options::EXACTLY_ONE_DASH, 'O', 0,
              N_("Optimize output file size"), N_("LEVEL"));
 
+  DEFINE_enum(orphan_handling, options::TWO_DASHES, '\0', "place",
+             N_("Orphan section handling"), N_("[place,discard,warn,error]"),
+             {"place", "discard", "warn", "error"});
+
   // p
 
   DEFINE_bool(p, options::ONE_DASH, 'p', false,
@@ -1199,6 +1203,9 @@ class General_options
   DEFINE_special(section_start, options::TWO_DASHES, '\0',
                 N_("Set address of section"), N_("SECTION=ADDRESS"));
 
+  DEFINE_bool(secure_plt, options::TWO_DASHES , '\0', true,
+             N_("(PowerPC only) Use new-style PLT"), NULL);
+
   DEFINE_optional_string(sort_common, options::TWO_DASHES, '\0', NULL,
                         N_("Sort common symbols by alignment"),
                         N_("[={ascending,descending}]"));
@@ -1399,6 +1406,9 @@ class General_options
 
   // The -z options.
 
+  DEFINE_bool(bndplt, options::DASH_Z, '\0', false,
+             N_("(x86-64 only) Generate a BND PLT for Intel MPX"),
+             N_("Generate a regular PLT"));
   DEFINE_bool(combreloc, options::DASH_Z, '\0', true,
              N_("Sort dynamic relocs"),
              N_("Do not sort dynamic relocs"));
@@ -1684,6 +1694,22 @@ class General_options
   discard_sec_merge() const
   { return this->discard_locals_ == DISCARD_SEC_MERGE; }
 
+  enum Orphan_handling
+  {
+    // Place orphan sections normally (default).
+    ORPHAN_PLACE,
+    // Discard all orphan sections.
+    ORPHAN_DISCARD,
+    // Warn when placing orphan sections.
+    ORPHAN_WARN,
+    // Issue error for orphan sections.
+    ORPHAN_ERROR
+  };
+
+  Orphan_handling
+  orphan_handling_enum() const
+  { return this->orphan_handling_enum_; }
+
  private:
   // Don't copy this structure.
   General_options(const General_options&);
@@ -1739,6 +1765,10 @@ class General_options
   set_static(bool value)
   { static_ = value; }
 
+  void
+  set_orphan_handling_enum(Orphan_handling value)
+  { this->orphan_handling_enum_ = value; }
+
   // These are called by finalize() to set up the search-path correctly.
   void
   add_to_library_path_with_sysroot(const std::string& arg)
@@ -1804,6 +1834,8 @@ class General_options
   Discard_locals discard_locals_;
   // Stack of saved options for --push-state/--pop-state.
   std::vector<Position_dependent_options*> options_stack_;
+  // Orphan handling option, decoded to an enum value.
+  Orphan_handling orphan_handling_enum_;
 };
 
 // The position-dependent options.  We use this to store the state of
This page took 0.025065 seconds and 4 git commands to generate.