dwarf_loader: Remove unused strings variable and debug_fmt_ops->{init,exit}()

No need to create that object anymore.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Arnaldo Carvalho de Melo 2021-06-28 13:45:22 -03:00
parent 3d3b7b3287
commit a388aaf489
1 changed files with 0 additions and 19 deletions

View File

@ -22,11 +22,8 @@
#include "list.h" #include "list.h"
#include "dwarves.h" #include "dwarves.h"
#include "dutil.h" #include "dutil.h"
#include "pahole_strings.h"
#include "hash.h" #include "hash.h"
struct strings *strings;
#ifndef DW_AT_alignment #ifndef DW_AT_alignment
#define DW_AT_alignment 0x88 #define DW_AT_alignment 0x88
#endif #endif
@ -236,8 +233,6 @@ static struct dwarf_tag *dwarf_cu__find_type_by_ref(const struct dwarf_cu *dcu,
return hashtags__find(dcu->hash_types, ref->off); return hashtags__find(dcu->hash_types, ref->off);
} }
extern struct strings *strings;
static void *memdup(const void *src, size_t len, struct cu *cu) static void *memdup(const void *src, size_t len, struct cu *cu)
{ {
void *s = malloc(len); void *s = malloc(len);
@ -2900,22 +2895,8 @@ static int dwarf__load_file(struct cus *cus, struct conf_load *conf,
return err; return err;
} }
static int dwarf__init(void)
{
strings = strings__new();
return strings != NULL ? 0 : -ENOMEM;
}
static void dwarf__exit(void)
{
strings__delete(strings);
strings = NULL;
}
struct debug_fmt_ops dwarf__ops = { struct debug_fmt_ops dwarf__ops = {
.name = "dwarf", .name = "dwarf",
.init = dwarf__init,
.exit = dwarf__exit,
.load_file = dwarf__load_file, .load_file = dwarf__load_file,
.tag__decl_file = dwarf_tag__decl_file, .tag__decl_file = dwarf_tag__decl_file,
.tag__decl_line = dwarf_tag__decl_line, .tag__decl_line = dwarf_tag__decl_line,