static void mmo_xore_64 (asection *, bfd_vma vma, bfd_vma value);
static void mmo_xore_32 (asection *, bfd_vma vma, unsigned int);
static void mmo_xore_16 (asection *, bfd_vma vma, unsigned int);
-static const bfd_target *mmo_object_p (bfd *);
+static bfd_cleanup mmo_object_p (bfd *);
static void mmo_map_set_sizes (bfd *, asection *, void *);
static bfd_boolean mmo_get_symbols (bfd *);
static bfd_boolean mmo_create_symbol (bfd *, const char *, bfd_vma,
/* Check whether an existing file is an mmo file. */
-static const bfd_target *
+static bfd_cleanup
mmo_object_p (bfd *abfd)
{
struct stat statbuf;
if (! bfd_default_set_arch_mach (abfd, bfd_arch_mmix, 0))
goto bad_format_free;
- return abfd->xvec;
+ return _bfd_no_cleanup;
bad_format_free:
free (abfd->tdata.mmo_data->lop_stab_symbol);
unsigned int lineno = 1;
bfd_boolean error = FALSE;
bfd_vma vma = 0;
- asection *sec = bfd_make_section_old_way (abfd, MMO_TEXT_SECTION_NAME);
+ asection *sec = NULL;
asection *non_spec_sec = NULL;
bfd_vma non_spec_vma = 0;
bfd_size_type nbytes_read = 0;
goto error_return;
vma &= ~3;
+ if (sec == NULL)
+ sec = bfd_make_section_old_way (abfd, MMO_TEXT_SECTION_NAME);
mmo_xore_32 (sec, vma, bfd_get_32 (abfd, buf));
vma += 4;
lineno++;
else
{
/* This wasn't a lopcode, so store it in the current section. */
+ if (sec == NULL)
+ sec = bfd_make_section_old_way (abfd, MMO_TEXT_SECTION_NAME);
mmo_xore_32 (sec, vma & ~3, bfd_get_32 (abfd, buf));
vma += 4;
vma &= ~3;