+void host_dasm_new_symbol_(void *addr, const char *name)
+{
+ bfd_vma vma = (bfd_vma)(long)addr;
+ asymbol *sym, **tmp;
+
+ if (!init_done)
+ host_dasm_init();
+ if (symbols == NULL)
+ return;
+ if (symstorage <= symcount * sizeof(symbols[0])) {
+ tmp = realloc(symbols, symstorage * 2);
+ if (tmp == NULL)
+ return;
+ symstorage *= 2;
+ symbols = tmp;
+ }
+
+ symbols[symcount] = calloc(sizeof(*symbols[0]), 1);
+ if (symbols[symcount] == NULL)
+ return;
+
+ // a HACK (should use correct section), but ohwell
+ sym = symbols[symcount];
+ sym->section = symbols[0]->section;
+ sym->value = vma - sym->section->vma;
+ sym->name = name;
+ symcount++;
+}
+