X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=ld%2Ftestplug.c;h=cec947c51c44e7e4334036ecfe96392eb7c32643;hb=8465445732dc04c3fb6cf954274e12d06b274f08;hp=f04df10fa051061262cb77fcc4d38e1acdfd2b11;hpb=ada487f6b3f8fdc448569d8cdc80f3279787ec29;p=deliverable%2Fbinutils-gdb.git diff --git a/ld/testplug.c b/ld/testplug.c index f04df10fa0..cec947c51c 100644 --- a/ld/testplug.c +++ b/ld/testplug.c @@ -1,5 +1,5 @@ /* Test plugin for the GNU linker. - Copyright 2010 Free Software Foundation, Inc. + Copyright (C) 2010-2016 Free Software Foundation, Inc. This file is part of the GNU Binutils. @@ -83,9 +83,11 @@ static const tag_name_t tag_names[] = ADDENTRY(LDPT_REGISTER_CLEANUP_HOOK), ADDENTRY(LDPT_ADD_SYMBOLS), ADDENTRY(LDPT_GET_SYMBOLS), + ADDENTRY(LDPT_GET_SYMBOLS_V2), ADDENTRY(LDPT_ADD_INPUT_FILE), ADDENTRY(LDPT_MESSAGE), ADDENTRY(LDPT_GET_INPUT_FILE), + ADDENTRY(LDPT_GET_VIEW), ADDENTRY(LDPT_RELEASE_INPUT_FILE), ADDENTRY(LDPT_ADD_INPUT_LIBRARY), ADDENTRY(LDPT_OUTPUT_NAME), @@ -99,9 +101,11 @@ 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_add_symbols tv_add_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_message tv_message = 0; static ld_plugin_get_input_file tv_get_input_file = 0; +static ld_plugin_get_view tv_get_view = 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_set_extra_library_path tv_set_extra_library_path = 0; @@ -166,7 +170,7 @@ record_add_file (const char *file, addfile_enum_t type) return LDPS_ERR; newfile->next = NULL; newfile->name = file; - newfile->type = type;; + newfile->type = type; /* Chain it on the end of the list. */ *addfiles_tail_chain_ptr = newfile; addfiles_tail_chain_ptr = &newfile->next; @@ -361,9 +365,11 @@ dump_tv_tag (size_t n, struct ld_plugin_tv *tv) case LDPT_REGISTER_CLEANUP_HOOK: case LDPT_ADD_SYMBOLS: case LDPT_GET_SYMBOLS: + case LDPT_GET_SYMBOLS_V2: case LDPT_ADD_INPUT_FILE: case LDPT_MESSAGE: case LDPT_GET_INPUT_FILE: + case LDPT_GET_VIEW: case LDPT_RELEASE_INPUT_FILE: case LDPT_ADD_INPUT_LIBRARY: case LDPT_SET_EXTRA_LIBRARY_PATH: @@ -418,6 +424,9 @@ parse_tv_tag (struct ld_plugin_tv *tv) case LDPT_GET_SYMBOLS: SETVAR(tv_get_symbols); break; + case LDPT_GET_SYMBOLS_V2: + tv_get_symbols_v2 = tv->tv_u.tv_get_symbols; + break; case LDPT_ADD_INPUT_FILE: SETVAR(tv_add_input_file); break; @@ -427,6 +436,9 @@ parse_tv_tag (struct ld_plugin_tv *tv) case LDPT_GET_INPUT_FILE: SETVAR(tv_get_input_file); break; + case LDPT_GET_VIEW: + SETVAR(tv_get_view); + break; case LDPT_RELEASE_INPUT_FILE: SETVAR(tv_release_input_file); break; @@ -562,6 +574,7 @@ onall_symbols_read (void) "LDPR_RESOLVED_IR", "LDPR_RESOLVED_EXEC", "LDPR_RESOLVED_DYN", + "LDPR_PREVAILING_DEF_IRONLY_EXP", }; claim_file_t *claimfile = dumpresolutions ? claimfiles_list : NULL; add_file_t *addfile = addfiles_list; @@ -570,12 +583,12 @@ onall_symbols_read (void) { enum ld_plugin_status rv; int n; - if (claimfile->n_syms_used && !tv_get_symbols) + if (claimfile->n_syms_used && !tv_get_symbols_v2) return LDPS_ERR; else if (!claimfile->n_syms_used) continue; - rv = tv_get_symbols (claimfile->file.handle, claimfile->n_syms_used, - claimfile->symbols); + rv = tv_get_symbols_v2 (claimfile->file.handle, claimfile->n_syms_used, + claimfile->symbols); if (rv != LDPS_OK) return rv; for (n = 0; n < claimfile->n_syms_used; n++)