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

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [gnu/] [binutils/] [ld/] [ldlang.c] - Diff between revs 157 and 163

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

Rev 157 Rev 163
Line 1131... Line 1131...
  p->loaded = FALSE;
  p->loaded = FALSE;
  p->missing_file = FALSE;
  p->missing_file = FALSE;
#ifdef ENABLE_PLUGINS
#ifdef ENABLE_PLUGINS
  p->claimed = FALSE;
  p->claimed = FALSE;
  p->claim_archive = FALSE;
  p->claim_archive = FALSE;
 
  p->reload = FALSE;
#endif /* ENABLE_PLUGINS */
#endif /* ENABLE_PLUGINS */
 
 
  lang_statement_append (&input_file_chain,
  lang_statement_append (&input_file_chain,
                         (lang_statement_union_type *) p,
                         (lang_statement_union_type *) p,
                         &p->next_real_file);
                         &p->next_real_file);
Line 2778... Line 2779...
    {
    {
    default:
    default:
      break;
      break;
 
 
    case bfd_object:
    case bfd_object:
 
#ifdef ENABLE_PLUGINS
 
      if (!entry->reload)
 
#endif
      ldlang_add_file (entry);
      ldlang_add_file (entry);
      if (trace_files || trace_file_tries)
      if (trace_files || trace_file_tries)
        info_msg ("%I\n", entry);
        info_msg ("%I\n", entry);
      break;
      break;
 
 
Line 3270... Line 3274...
                  && !s->input_statement.whole_archive
                  && !s->input_statement.whole_archive
                  && s->input_statement.loaded
                  && s->input_statement.loaded
                  && bfd_check_format (s->input_statement.the_bfd,
                  && bfd_check_format (s->input_statement.the_bfd,
                                       bfd_archive))
                                       bfd_archive))
                s->input_statement.loaded = FALSE;
                s->input_statement.loaded = FALSE;
 
#ifdef ENABLE_PLUGINS
 
              /* When rescanning, reload --as-needed shared libs.  */
 
              else if ((mode & OPEN_BFD_RESCAN) != 0
 
                       && plugin_insert == NULL
 
                       && s->input_statement.loaded
 
                       && s->input_statement.add_DT_NEEDED_for_regular
 
                       && ((s->input_statement.the_bfd->flags) & DYNAMIC) != 0
 
                       && plugin_should_reload (s->input_statement.the_bfd))
 
                {
 
                  s->input_statement.loaded = FALSE;
 
                  s->input_statement.reload = TRUE;
 
                }
 
#endif
 
 
              os_tail = lang_output_section_statement.tail;
              os_tail = lang_output_section_statement.tail;
              lang_list_init (&add);
              lang_list_init (&add);
 
 
              if (! load_symbols (&s->input_statement, &add))
              if (! load_symbols (&s->input_statement, &add))
Line 7456... Line 7473...
  overlay_max = NULL;
  overlay_max = NULL;
}
}


/* Version handling.  This is only useful for ELF.  */
/* Version handling.  This is only useful for ELF.  */
 
 
/* This global variable holds the version tree that we build.  */
 
 
 
struct bfd_elf_version_tree *lang_elf_version_info;
 
 
 
/* If PREV is NULL, return first version pattern matching particular symbol.
/* If PREV is NULL, return first version pattern matching particular symbol.
   If PREV is non-NULL, return first version pattern matching particular
   If PREV is non-NULL, return first version pattern matching particular
   symbol after PREV (previously returned by lang_vers_match).  */
   symbol after PREV (previously returned by lang_vers_match).  */
 
 
static struct bfd_elf_version_expr *
static struct bfd_elf_version_expr *
Line 7801... Line 7814...
  struct bfd_elf_version_expr *e1;
  struct bfd_elf_version_expr *e1;
 
 
  if (name == NULL)
  if (name == NULL)
    name = "";
    name = "";
 
 
  if ((name[0] == '\0' && lang_elf_version_info != NULL)
  if (link_info.version_info != NULL
      || (lang_elf_version_info && lang_elf_version_info->name[0] == '\0'))
      && (name[0] == '\0' || link_info.version_info->name[0] == '\0'))
    {
    {
      einfo (_("%X%P: anonymous version tag cannot be combined"
      einfo (_("%X%P: anonymous version tag cannot be combined"
               " with other version tags\n"));
               " with other version tags\n"));
      free (version);
      free (version);
      return;
      return;
    }
    }
 
 
  /* Make sure this node has a unique name.  */
  /* Make sure this node has a unique name.  */
  for (t = lang_elf_version_info; t != NULL; t = t->next)
  for (t = link_info.version_info; t != NULL; t = t->next)
    if (strcmp (t->name, name) == 0)
    if (strcmp (t->name, name) == 0)
      einfo (_("%X%P: duplicate version tag `%s'\n"), name);
      einfo (_("%X%P: duplicate version tag `%s'\n"), name);
 
 
  lang_finalize_version_expr_head (&version->globals);
  lang_finalize_version_expr_head (&version->globals);
  lang_finalize_version_expr_head (&version->locals);
  lang_finalize_version_expr_head (&version->locals);
Line 7823... Line 7836...
  /* Check the global and local match names, and make sure there
  /* Check the global and local match names, and make sure there
     aren't any duplicates.  */
     aren't any duplicates.  */
 
 
  for (e1 = version->globals.list; e1 != NULL; e1 = e1->next)
  for (e1 = version->globals.list; e1 != NULL; e1 = e1->next)
    {
    {
      for (t = lang_elf_version_info; t != NULL; t = t->next)
      for (t = link_info.version_info; t != NULL; t = t->next)
        {
        {
          struct bfd_elf_version_expr *e2;
          struct bfd_elf_version_expr *e2;
 
 
          if (t->locals.htab && e1->literal)
          if (t->locals.htab && e1->literal)
            {
            {
Line 7850... Line 7863...
        }
        }
    }
    }
 
 
  for (e1 = version->locals.list; e1 != NULL; e1 = e1->next)
  for (e1 = version->locals.list; e1 != NULL; e1 = e1->next)
    {
    {
      for (t = lang_elf_version_info; t != NULL; t = t->next)
      for (t = link_info.version_info; t != NULL; t = t->next)
        {
        {
          struct bfd_elf_version_expr *e2;
          struct bfd_elf_version_expr *e2;
 
 
          if (t->globals.htab && e1->literal)
          if (t->globals.htab && e1->literal)
            {
            {
Line 7886... Line 7899...
      version->vernum = version_index;
      version->vernum = version_index;
    }
    }
  else
  else
    version->vernum = 0;
    version->vernum = 0;
 
 
  for (pp = &lang_elf_version_info; *pp != NULL; pp = &(*pp)->next)
  for (pp = &link_info.version_info; *pp != NULL; pp = &(*pp)->next)
    ;
    ;
  *pp = version;
  *pp = version;
}
}
 
 
/* This is called when we see a version dependency.  */
/* This is called when we see a version dependency.  */
Line 7902... Line 7915...
  struct bfd_elf_version_tree *t;
  struct bfd_elf_version_tree *t;
 
 
  ret = (struct bfd_elf_version_deps *) xmalloc (sizeof *ret);
  ret = (struct bfd_elf_version_deps *) xmalloc (sizeof *ret);
  ret->next = list;
  ret->next = list;
 
 
  for (t = lang_elf_version_info; t != NULL; t = t->next)
  for (t = link_info.version_info; t != NULL; t = t->next)
    {
    {
      if (strcmp (t->name, name) == 0)
      if (strcmp (t->name, name) == 0)
        {
        {
          ret->version_needed = t;
          ret->version_needed = t;
          return ret;
          return ret;

powered by: WebSVN 2.1.0

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