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

Subversion Repositories open8_urisc

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

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

Rev 145 Rev 163
Line 81... Line 81...
  ADDENTRY(LDPT_REGISTER_CLAIM_FILE_HOOK),
  ADDENTRY(LDPT_REGISTER_CLAIM_FILE_HOOK),
  ADDENTRY(LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK),
  ADDENTRY(LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK),
  ADDENTRY(LDPT_REGISTER_CLEANUP_HOOK),
  ADDENTRY(LDPT_REGISTER_CLEANUP_HOOK),
  ADDENTRY(LDPT_ADD_SYMBOLS),
  ADDENTRY(LDPT_ADD_SYMBOLS),
  ADDENTRY(LDPT_GET_SYMBOLS),
  ADDENTRY(LDPT_GET_SYMBOLS),
 
  ADDENTRY(LDPT_GET_SYMBOLS_V2),
  ADDENTRY(LDPT_ADD_INPUT_FILE),
  ADDENTRY(LDPT_ADD_INPUT_FILE),
  ADDENTRY(LDPT_MESSAGE),
  ADDENTRY(LDPT_MESSAGE),
  ADDENTRY(LDPT_GET_INPUT_FILE),
  ADDENTRY(LDPT_GET_INPUT_FILE),
  ADDENTRY(LDPT_RELEASE_INPUT_FILE),
  ADDENTRY(LDPT_RELEASE_INPUT_FILE),
  ADDENTRY(LDPT_ADD_INPUT_LIBRARY),
  ADDENTRY(LDPT_ADD_INPUT_LIBRARY),
Line 97... Line 98...
static ld_plugin_register_claim_file tv_register_claim_file = 0;
static ld_plugin_register_claim_file tv_register_claim_file = 0;
static ld_plugin_register_all_symbols_read tv_register_all_symbols_read = 0;
static ld_plugin_register_all_symbols_read tv_register_all_symbols_read = 0;
static ld_plugin_register_cleanup tv_register_cleanup = 0;
static ld_plugin_register_cleanup tv_register_cleanup = 0;
static ld_plugin_add_symbols tv_add_symbols = 0;
static ld_plugin_add_symbols tv_add_symbols = 0;
static ld_plugin_get_symbols tv_get_symbols = 0;
static ld_plugin_get_symbols tv_get_symbols = 0;
 
static ld_plugin_get_symbols tv_get_symbols_v2 = 0;
static ld_plugin_add_input_file tv_add_input_file = 0;
static ld_plugin_add_input_file tv_add_input_file = 0;
static ld_plugin_message tv_message = 0;
static ld_plugin_message tv_message = 0;
static ld_plugin_get_input_file tv_get_input_file = 0;
static ld_plugin_get_input_file tv_get_input_file = 0;
static ld_plugin_release_input_file tv_release_input_file = 0;
static ld_plugin_release_input_file tv_release_input_file = 0;
static ld_plugin_add_input_library tv_add_input_library = 0;
static ld_plugin_add_input_library tv_add_input_library = 0;
Line 359... Line 361...
      case LDPT_REGISTER_CLAIM_FILE_HOOK:
      case LDPT_REGISTER_CLAIM_FILE_HOOK:
      case LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK:
      case LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK:
      case LDPT_REGISTER_CLEANUP_HOOK:
      case LDPT_REGISTER_CLEANUP_HOOK:
      case LDPT_ADD_SYMBOLS:
      case LDPT_ADD_SYMBOLS:
      case LDPT_GET_SYMBOLS:
      case LDPT_GET_SYMBOLS:
 
      case LDPT_GET_SYMBOLS_V2:
      case LDPT_ADD_INPUT_FILE:
      case LDPT_ADD_INPUT_FILE:
      case LDPT_MESSAGE:
      case LDPT_MESSAGE:
      case LDPT_GET_INPUT_FILE:
      case LDPT_GET_INPUT_FILE:
      case LDPT_RELEASE_INPUT_FILE:
      case LDPT_RELEASE_INPUT_FILE:
      case LDPT_ADD_INPUT_LIBRARY:
      case LDPT_ADD_INPUT_LIBRARY:
Line 416... Line 419...
        SETVAR(tv_add_symbols);
        SETVAR(tv_add_symbols);
        break;
        break;
      case LDPT_GET_SYMBOLS:
      case LDPT_GET_SYMBOLS:
        SETVAR(tv_get_symbols);
        SETVAR(tv_get_symbols);
        break;
        break;
 
      case LDPT_GET_SYMBOLS_V2:
 
        tv_get_symbols_v2 = tv->tv_u.tv_get_symbols;
 
        break;
      case LDPT_ADD_INPUT_FILE:
      case LDPT_ADD_INPUT_FILE:
        SETVAR(tv_add_input_file);
        SETVAR(tv_add_input_file);
        break;
        break;
      case LDPT_MESSAGE:
      case LDPT_MESSAGE:
        SETVAR(tv_message);
        SETVAR(tv_message);
Line 560... Line 566...
      "LDPR_PREEMPTED_REG",
      "LDPR_PREEMPTED_REG",
      "LDPR_PREEMPTED_IR",
      "LDPR_PREEMPTED_IR",
      "LDPR_RESOLVED_IR",
      "LDPR_RESOLVED_IR",
      "LDPR_RESOLVED_EXEC",
      "LDPR_RESOLVED_EXEC",
      "LDPR_RESOLVED_DYN",
      "LDPR_RESOLVED_DYN",
 
      "LDPR_PREVAILING_DEF_IRONLY_EXP",
    };
    };
  claim_file_t *claimfile = dumpresolutions ? claimfiles_list : NULL;
  claim_file_t *claimfile = dumpresolutions ? claimfiles_list : NULL;
  add_file_t *addfile = addfiles_list;
  add_file_t *addfile = addfiles_list;
  TV_MESSAGE (LDPL_INFO, "hook called: all symbols read.");
  TV_MESSAGE (LDPL_INFO, "hook called: all symbols read.");
  for ( ; claimfile; claimfile = claimfile->next)
  for ( ; claimfile; claimfile = claimfile->next)
    {
    {
      enum ld_plugin_status rv;
      enum ld_plugin_status rv;
      int n;
      int n;
      if (claimfile->n_syms_used && !tv_get_symbols)
      if (claimfile->n_syms_used && !tv_get_symbols_v2)
        return LDPS_ERR;
        return LDPS_ERR;
      else if (!claimfile->n_syms_used)
      else if (!claimfile->n_syms_used)
        continue;
        continue;
      rv = tv_get_symbols (claimfile->file.handle, claimfile->n_syms_used,
      rv = tv_get_symbols_v2 (claimfile->file.handle, claimfile->n_syms_used,
                                claimfile->symbols);
                                claimfile->symbols);
      if (rv != LDPS_OK)
      if (rv != LDPS_OK)
        return rv;
        return rv;
      for (n = 0; n < claimfile->n_syms_used; n++)
      for (n = 0; n < claimfile->n_syms_used; n++)
        TV_MESSAGE (LDPL_INFO, "Sym: '%s%s%s' Resolution: %s",
        TV_MESSAGE (LDPL_INFO, "Sym: '%s%s%s' Resolution: %s",

powered by: WebSVN 2.1.0

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