]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gold/options.h
Add support for -e and for ENTRY in linker scripts.
[thirdparty/binutils-gdb.git] / gold / options.h
index 86d9bd7b6b29588d9b44c20b3fd08659f80d2308..4cb760809ca32a66820ff7bc42eaa636d12be53c 100644 (file)
@@ -108,6 +108,11 @@ class General_options
  public:
   General_options();
 
+  // -e: set entry address.
+  const char*
+  entry() const
+  { return this->entry_; }
+
   // -E: export dynamic symbols.
   bool
   export_dynamic() const
@@ -311,6 +316,10 @@ class General_options
     ZLIB_COMPRESSION,
   };
 
+  void
+  set_entry(const char* arg)
+  { this->entry_ = arg; }
+
   void
   set_export_dynamic()
   { this->export_dynamic_ = true; }
@@ -509,6 +518,7 @@ class General_options
   void
   add_sysroot();
 
+  const char* entry_;
   bool export_dynamic_;
   const char* soname_;
   const char* dynamic_linker_;
@@ -824,6 +834,11 @@ class Command_line
   void
   end_group(const char* arg);
 
+  // Set the entry symbol from a linker script.
+  void
+  set_entry(const char* entry)
+  { this->options_.set_entry(entry); }
+
   // Get an option argument--a helper function for special processing.
   const char*
   get_special_argument(const char* longname, int argc, char** argv,