core: Ditch dwarves__active_loader, unused
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
713239bc00
commit
ee5c12893b
|
@ -513,8 +513,6 @@ static int32_t btf_encoder__add_func_param(struct btf_encoder *encoder, const ch
|
|||
}
|
||||
}
|
||||
|
||||
extern struct debug_fmt_ops *dwarves__active_loader;
|
||||
|
||||
static int32_t btf_encoder__add_func_proto(struct btf_encoder *encoder, struct cu *cu, struct ftype *ftype, uint32_t type_id_off)
|
||||
{
|
||||
struct btf *btf = encoder->btf;
|
||||
|
@ -727,8 +725,6 @@ static void dump_invalid_symbol(const char *msg, const char *sym,
|
|||
fprintf(stderr, "PAHOLE: Error: Use '--btf_encode_force' to ignore such symbols and force emit the btf.\n");
|
||||
}
|
||||
|
||||
extern struct debug_fmt_ops *dwarves__active_loader;
|
||||
|
||||
static int tag__check_id_drift(const struct tag *tag,
|
||||
uint32_t core_id, uint32_t btf_type_id,
|
||||
uint32_t type_id_off)
|
||||
|
|
|
@ -1959,8 +1959,6 @@ static struct debug_fmt_ops *debug_fmt_table[] = {
|
|||
NULL,
|
||||
};
|
||||
|
||||
struct debug_fmt_ops *dwarves__active_loader;
|
||||
|
||||
static int debugging_formats__loader(const char *name)
|
||||
{
|
||||
int i = 0;
|
||||
|
@ -1998,7 +1996,6 @@ int cus__load_file(struct cus *cus, struct conf_load *conf,
|
|||
conf->conf_fprintf->has_alignment_info = debug_fmt_table[loader]->has_alignment_info;
|
||||
|
||||
err = 0;
|
||||
dwarves__active_loader = debug_fmt_table[loader];
|
||||
if (debug_fmt_table[loader]->load_file(cus, conf,
|
||||
filename) == 0)
|
||||
break;
|
||||
|
@ -2010,20 +2007,17 @@ int cus__load_file(struct cus *cus, struct conf_load *conf,
|
|||
fp = sep + 1;
|
||||
}
|
||||
free(fpath);
|
||||
dwarves__active_loader = NULL;
|
||||
return err;
|
||||
}
|
||||
|
||||
while (debug_fmt_table[i] != NULL) {
|
||||
if (conf && conf->conf_fprintf)
|
||||
conf->conf_fprintf->has_alignment_info = debug_fmt_table[i]->has_alignment_info;
|
||||
dwarves__active_loader = debug_fmt_table[i];
|
||||
if (debug_fmt_table[i]->load_file(cus, conf, filename) == 0)
|
||||
return 0;
|
||||
++i;
|
||||
}
|
||||
|
||||
dwarves__active_loader = NULL;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
@ -2345,10 +2339,8 @@ static int cus__load_running_kernel(struct cus *cus, struct conf_load *conf)
|
|||
if (conf && conf->conf_fprintf)
|
||||
conf->conf_fprintf->has_alignment_info = debug_fmt_table[loader]->has_alignment_info;
|
||||
|
||||
dwarves__active_loader = debug_fmt_table[loader];
|
||||
if (debug_fmt_table[loader]->load_file(cus, conf, "/sys/kernel/btf/vmlinux") == 0)
|
||||
return 0;
|
||||
dwarves__active_loader = NULL;
|
||||
}
|
||||
try_elf:
|
||||
elf_version(EV_CURRENT);
|
||||
|
|
Loading…
Reference in New Issue