From Craig Silverstein: rename some option functions in preparation
[external/binutils.git] / gold / fileread.cc
index 2defbf8..2931d43 100644 (file)
@@ -643,7 +643,7 @@ Input_file::open(const General_options& options, const Dirsearch& dirpath,
       n1 += this->input_argument_->name();
       std::string n2;
       if (options.is_static()
-         || this->input_argument_->options().Bstatic())
+         || !this->input_argument_->options().Bdynamic())
        n1 += ".a";
       else
        {
@@ -691,7 +691,7 @@ Input_file::open(const General_options& options, const Dirsearch& dirpath,
   // Now that we've figured out where the file lives, try to open it.
 
   General_options::Object_format format =
-    this->input_argument_->options().format();
+    this->input_argument_->options().format_enum();
   bool ok;
   if (format == General_options::OBJECT_FORMAT_ELF)
     ok = this->file_.open(task, name);
@@ -714,17 +714,17 @@ Input_file::open(const General_options& options, const Dirsearch& dirpath,
 // Open a file for --format binary.
 
 bool
-Input_file::open_binary(const General_options& options,
+Input_file::open_binary(const General_options&,
                        const Task* task, const std::string& name)
 {
   // In order to open a binary file, we need machine code, size, and
   // endianness.  We may not have a valid target at this point, in
   // which case we use the default target.
-  Target* target;
-  if (parameters->is_target_valid())
-    target = parameters->target();
+  const Target* target;
+  if (parameters->target_valid())
+    target = &parameters->target();
   else
-    target = options.default_target();
+    target = &parameters->default_target();
 
   Binary_to_elf binary_to_elf(target->machine_code(),
                              target->get_size(),