OpenCores
URL https://opencores.org/ocsvn/open8_urisc/open8_urisc/trunk

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [gnu/] [binutils/] [gold/] [parameters.cc] - Diff between revs 27 and 159

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 27 Rev 159
Line 1... Line 1...
// parameters.cc -- general parameters for a link using gold
// parameters.cc -- general parameters for a link using gold
 
 
// Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
// Copyright 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
// Written by Ian Lance Taylor <iant@google.com>.
 
 
// This file is part of gold.
// This file is part of gold.
 
 
// This program is free software; you can redistribute it and/or modify
// This program is free software; you can redistribute it and/or modify
Line 246... Line 246...
Parameters::incremental() const
Parameters::incremental() const
{
{
  return this->incremental_mode_ != General_options::INCREMENTAL_OFF;
  return this->incremental_mode_ != General_options::INCREMENTAL_OFF;
}
}
 
 
 
// Return true if we are doing a full incremental link.
 
 
 
bool
 
Parameters::incremental_full() const
 
{
 
  return this->incremental_mode_ == General_options::INCREMENTAL_FULL;
 
}
 
 
// Return true if we are doing an incremental update.
// Return true if we are doing an incremental update.
 
 
bool
bool
Parameters::incremental_update() const
Parameters::incremental_update() const
{
{
Line 297... Line 305...
    return;
    return;
 
 
  gold_assert(parameters->options_valid());
  gold_assert(parameters->options_valid());
  if (parameters->options().user_set_oformat())
  if (parameters->options().user_set_oformat())
    {
    {
      Target* target = select_target_by_name(parameters->options().oformat());
      const char* bfd_name = parameters->options().oformat();
 
      Target* target = select_target_by_bfd_name(bfd_name);
 
      if (target != NULL)
 
        {
 
          set_parameters_target(target);
 
          return;
 
        }
 
 
 
      gold_error(_("unrecognized output format %s"), bfd_name);
 
    }
 
 
 
  if (parameters->options().user_set_m())
 
    {
 
      const char* emulation = parameters->options().m();
 
      Target* target = select_target_by_emulation(emulation);
      if (target != NULL)
      if (target != NULL)
        {
        {
          set_parameters_target(target);
          set_parameters_target(target);
          return;
          return;
        }
        }
 
 
      gold_error(_("unrecognized output format %s"),
      gold_error(_("unrecognized emulation %s"), emulation);
                 parameters->options().oformat());
 
    }
    }
 
 
  // The GOLD_DEFAULT_xx macros are defined by the configure script.
  // The GOLD_DEFAULT_xx macros are defined by the configure script.
  bool is_big_endian;
  bool is_big_endian;
  General_options::Endianness endianness = parameters->options().endianness();
  General_options::Endianness endianness = parameters->options().endianness();
Line 323... Line 344...
  Target* target = select_target(elfcpp::GOLD_DEFAULT_MACHINE,
  Target* target = select_target(elfcpp::GOLD_DEFAULT_MACHINE,
                                 GOLD_DEFAULT_SIZE,
                                 GOLD_DEFAULT_SIZE,
                                 is_big_endian,
                                 is_big_endian,
                                 elfcpp::GOLD_DEFAULT_OSABI,
                                 elfcpp::GOLD_DEFAULT_OSABI,
                                 0);
                                 0);
  gold_assert(target != NULL);
 
 
  if (target == NULL)
 
    {
 
      gold_assert(is_big_endian != GOLD_DEFAULT_BIG_ENDIAN);
 
      gold_fatal(_("no supported target for -EB/-EL option"));
 
    }
 
 
  set_parameters_target(target);
  set_parameters_target(target);
}
}
 
 
// Clear the current target, for testing.
// Clear the current target, for testing.
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.