58 asymbol **symbol_table = NULL;
59 const char *symname =
"Dicos_loadModuleInfo";
68 section = bfd_get_section_by_name (abfd,
"header");
72 if (bfd_section_size (abfd, section) != header_size)
78 storage_needed = bfd_get_symtab_upper_bound (abfd);
79 if (storage_needed < 0)
81 warning (
_(
"Can't read elf symbols from %s: %s"),
82 bfd_get_filename (abfd),
83 bfd_errmsg (bfd_get_error ()));
87 if (storage_needed > 0)
91 symbol_table = (asymbol **)
xmalloc (storage_needed);
92 symcount = bfd_canonicalize_symtab (abfd, symbol_table);
95 warning (
_(
"Can't read elf symbols from %s: %s"),
96 bfd_get_filename (abfd),
97 bfd_errmsg (bfd_get_error ()));
100 for (i = 0; i < symcount; i++)
102 asymbol *sym = symbol_table[i];
103 if (sym->name != NULL
104 && symname[0] == sym->name[0]
105 && strcmp (symname + 1, sym->name + 1) == 0)
114 xfree (symbol_table);
void set_solib_ops(struct gdbarch *gdbarch, const struct target_so_ops *new_ops)
void warning(const char *fmt,...)
void set_gdbarch_has_global_solist(struct gdbarch *gdbarch, int has_global_solist)
struct target_so_ops solib_target_so_ops
void dicos_init_abi(struct gdbarch *gdbarch)
void set_gdbarch_decr_pc_after_break(struct gdbarch *gdbarch, CORE_ADDR decr_pc_after_break)
void set_gdbarch_has_global_breakpoints(struct gdbarch *gdbarch, int has_global_breakpoints)
int dicos_load_module_p(bfd *abfd, int header_size)