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

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [gnu/] [binutils/] [gold/] [script.cc] - Diff between revs 163 and 166

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

Rev 163 Rev 166
Line 1533... Line 1533...
  *used_next_blocker = true;
  *used_next_blocker = true;
 
 
  return true;
  return true;
}
}
 
 
// Helper function for read_version_script() and
// Helper function for read_version_script(), read_commandline_script() and
// read_commandline_script().  Processes the given file in the mode
// script_include_directive().  Processes the given file in the mode indicated
// indicated by first_token and lex_mode.
// by first_token and lex_mode.
 
 
static bool
static bool
read_script_file(const char* filename, Command_line* cmdline,
read_script_file(const char* filename, Command_line* cmdline,
                 Script_options* script_options,
                 Script_options* script_options,
                 int first_token, Lex::Mode lex_mode)
                 int first_token, Lex::Mode lex_mode)
{
{
  // TODO: if filename is a relative filename, search for it manually
 
  // using "." + cmdline->options()->search_path() -- not dirsearch.
 
  Dirsearch dirsearch;
  Dirsearch dirsearch;
 
  std::string name = filename;
 
 
 
  // If filename is a relative filename, search for it manually using "." +
 
  // cmdline->options()->library_path() -- not dirsearch.
 
  if (!IS_ABSOLUTE_PATH(filename))
 
    {
 
      const General_options::Dir_list& search_path =
 
          cmdline->options().library_path();
 
      name = Dirsearch::find_file_in_dir_list(name, search_path, ".");
 
    }
 
 
  // The file locking code wants to record a Task, but we haven't
  // The file locking code wants to record a Task, but we haven't
  // started the workqueue yet.  This is only for debugging purposes,
  // started the workqueue yet.  This is only for debugging purposes,
  // so we invent a fake value.
  // so we invent a fake value.
  const Task* task = reinterpret_cast<const Task*>(-1);
  const Task* task = reinterpret_cast<const Task*>(-1);
 
 
  // We don't want this file to be opened in binary mode.
  // We don't want this file to be opened in binary mode.
  Position_dependent_options posdep = cmdline->position_dependent_options();
  Position_dependent_options posdep = cmdline->position_dependent_options();
  if (posdep.format_enum() == General_options::OBJECT_FORMAT_BINARY)
  if (posdep.format_enum() == General_options::OBJECT_FORMAT_BINARY)
    posdep.set_format_enum(General_options::OBJECT_FORMAT_ELF);
    posdep.set_format_enum(General_options::OBJECT_FORMAT_ELF);
  Input_file_argument input_argument(filename,
  Input_file_argument input_argument(name.c_str(),
                                     Input_file_argument::INPUT_FILE_TYPE_FILE,
                                     Input_file_argument::INPUT_FILE_TYPE_FILE,
                                     "", false, posdep);
                                     "", false, posdep);
  Input_file input_file(&input_argument);
  Input_file input_file(&input_argument);
  int dummy = 0;
  int dummy = 0;
  if (!input_file.open(dirsearch, task, &dummy))
  if (!input_file.open(dirsearch, task, &dummy))
Line 3349... Line 3357...
 
 
  return attributes;
  return attributes;
}
}
 
 
extern "C" void
extern "C" void
script_include_directive(void* closurev, const char*, size_t)
script_include_directive(void* closurev, const char* filename, size_t length)
{
{
  // FIXME: Implement ?
  Parser_closure* closure = static_cast<Parser_closure*>(closurev);
  yyerror (closurev, _("GOLD does not currently support INCLUDE directives"));
  std::string name(filename, length);
 
  Command_line* cmdline = closure->command_line();
 
  read_script_file(name.c_str(), cmdline, &cmdline->script_options(),
 
                   PARSING_LINKER_SCRIPT, Lex::LINKER_SCRIPT);
}
}
 
 
// Functions for memory regions.
// Functions for memory regions.
 
 
extern "C" Expression*
extern "C" Expression*

powered by: WebSVN 2.1.0

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