Line 54... |
Line 54... |
static ld_plugin_register_claim_file register_claim_file_hook = NULL;
|
static ld_plugin_register_claim_file register_claim_file_hook = NULL;
|
static ld_plugin_register_all_symbols_read register_all_symbols_read_hook = NULL;
|
static ld_plugin_register_all_symbols_read register_all_symbols_read_hook = NULL;
|
static ld_plugin_register_cleanup register_cleanup_hook = NULL;
|
static ld_plugin_register_cleanup register_cleanup_hook = NULL;
|
static ld_plugin_add_symbols add_symbols = NULL;
|
static ld_plugin_add_symbols add_symbols = NULL;
|
static ld_plugin_get_symbols get_symbols = NULL;
|
static ld_plugin_get_symbols get_symbols = NULL;
|
|
static ld_plugin_get_symbols get_symbols_v2 = NULL;
|
static ld_plugin_add_input_file add_input_file = NULL;
|
static ld_plugin_add_input_file add_input_file = NULL;
|
static ld_plugin_message message = NULL;
|
static ld_plugin_message message = NULL;
|
static ld_plugin_get_input_file get_input_file = NULL;
|
static ld_plugin_get_input_file get_input_file = NULL;
|
static ld_plugin_release_input_file release_input_file = NULL;
|
static ld_plugin_release_input_file release_input_file = NULL;
|
static ld_plugin_get_input_section_count get_input_section_count = NULL;
|
static ld_plugin_get_input_section_count get_input_section_count = NULL;
|
Line 118... |
Line 119... |
add_symbols = entry->tv_u.tv_add_symbols;
|
add_symbols = entry->tv_u.tv_add_symbols;
|
break;
|
break;
|
case LDPT_GET_SYMBOLS:
|
case LDPT_GET_SYMBOLS:
|
get_symbols = entry->tv_u.tv_get_symbols;
|
get_symbols = entry->tv_u.tv_get_symbols;
|
break;
|
break;
|
|
case LDPT_GET_SYMBOLS_V2:
|
|
get_symbols_v2 = entry->tv_u.tv_get_symbols;
|
|
break;
|
case LDPT_ADD_INPUT_FILE:
|
case LDPT_ADD_INPUT_FILE:
|
add_input_file = entry->tv_u.tv_add_input_file;
|
add_input_file = entry->tv_u.tv_add_input_file;
|
break;
|
break;
|
case LDPT_MESSAGE:
|
case LDPT_MESSAGE:
|
message = entry->tv_u.tv_message;
|
message = entry->tv_u.tv_message;
|
Line 392... |
Line 396... |
char* p;
|
char* p;
|
const char* filename;
|
const char* filename;
|
|
|
(*message)(LDPL_INFO, "all symbols read hook called");
|
(*message)(LDPL_INFO, "all symbols read hook called");
|
|
|
if (get_symbols == NULL)
|
if (get_symbols_v2 == NULL)
|
{
|
{
|
fprintf(stderr, "tv_get_symbols interface missing\n");
|
fprintf(stderr, "tv_get_symbols (v2) interface missing\n");
|
return LDPS_ERR;
|
return LDPS_ERR;
|
}
|
}
|
|
|
for (claimed_file = first_claimed_file;
|
for (claimed_file = first_claimed_file;
|
claimed_file != NULL;
|
claimed_file != NULL;
|
claimed_file = claimed_file->next)
|
claimed_file = claimed_file->next)
|
{
|
{
|
(*get_symbols)(claimed_file->handle, claimed_file->nsyms,
|
(*get_symbols_v2)(claimed_file->handle, claimed_file->nsyms,
|
claimed_file->syms);
|
claimed_file->syms);
|
|
|
for (i = 0; i < claimed_file->nsyms; ++i)
|
for (i = 0; i < claimed_file->nsyms; ++i)
|
{
|
{
|
switch (claimed_file->syms[i].resolution)
|
switch (claimed_file->syms[i].resolution)
|
Line 421... |
Line 425... |
res = "PREVAILING_DEF_REG";
|
res = "PREVAILING_DEF_REG";
|
break;
|
break;
|
case LDPR_PREVAILING_DEF_IRONLY:
|
case LDPR_PREVAILING_DEF_IRONLY:
|
res = "PREVAILING_DEF_IRONLY";
|
res = "PREVAILING_DEF_IRONLY";
|
break;
|
break;
|
|
case LDPR_PREVAILING_DEF_IRONLY_EXP:
|
|
res = "PREVAILING_DEF_IRONLY_EXP";
|
|
break;
|
case LDPR_PREEMPTED_REG:
|
case LDPR_PREEMPTED_REG:
|
res = "PREEMPTED_REG";
|
res = "PREEMPTED_REG";
|
break;
|
break;
|
case LDPR_PREEMPTED_IR:
|
case LDPR_PREEMPTED_IR:
|
res = "PREEMPTED_IR";
|
res = "PREEMPTED_IR";
|