/* srconv.c -- Sysroff conversion program
- Copyright 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1994-2016 Free Software Foundation, Inc.
This file is part of GNU Binutils.
last = !(ccode & 0xff00);
if (size & 0x7)
- abort ();
+ fatal (_("Checksum failure"));
+
ptr[0] = ccode | (last ? 0x80 : 0);
ptr[1] = bytes + 1;
ptr[bytes] = ~sum;
if (fwrite (ptr, bytes + 1, 1, ffile) != 1)
/* FIXME: Return error status. */
- abort ();
+ fatal (_("Failed to write checksum"));
}
ptr[byte + 3] = n >> 0;
break;
default:
- abort ();
+ fatal (_("Unsupported integer write size: %d"), size);
}
*idx += size * 8;
}
if (fwrite (b, sizeof (b), 1, file) != 1)
/* FIXME: Return error status. */
- abort ();
+ fatal (_("Failed to write TR block"));
}
static void
toolname = "C_H8/300S";
break;
default:
- abort();
+ fatal (_("Unrecognized H8300 sub-architecture: %ld"),
+ bfd_get_mach (abfd));
}
rnames = rname_h8300;
break;
rnames = rname_sh;
break;
default:
- abort ();
+ fatal (_("Unsupported architecture: %d"), bfd_get_arch (abfd));
}
if (! (bfd_get_file_flags(abfd) & EXEC_P))
break;
default:
- abort ();
+ fatal (_("Unrecognised type: %d"), type->type);
}
}
return;
default:
- abort ();
+ fatal (_("Unrecognised coff symbol type: %d"), symbol->type->type);
}
if (symbol->where->where == coff_where_member_of_struct)
break;
default:
- abort ();
+ fatal (_("Unrecognised coff symbol visibility: %d"), symbol->visible->type);
}
dsy.dlength = symbol->type->size;
break;
default:
- abort ();
+ fatal (_("Unrecognised coff symbol location: %d"), symbol->where->where);
}
switch (symbol->where->where)
break;
default:
- abort ();
+ fatal (_("Unrecognised coff symbol location: %d"), symbol->where->where);
}
if (symbol->where->where == coff_where_register)
break;
default:
- abort ();
+ fatal (_("Unrecognised coff symbol visibility: %d"), symbol->visible->type);
}
dsy.sfn = 0;
static void
wr_program_structure (struct coff_ofile *p, struct coff_sfile *sfile)
{
+ if (p->nsections < 4)
+ return;
walk_tree_sfile (p->sections + 4, sfile);
}
if (fwrite (b, sizeof (b), 1, file) != 1)
/* FIXME: Return error status. */
- abort ();
+ fatal (_("Failed to write CS struct"));
}
/* Write out the SC records for a unit. Create an SC
sysroff_swap_sc_out (file, &sc);
scount++;
}
+ free (info);
return scount;
}
struct coff_symbol *s;
struct coff_section *common_section;
+ if (otree->nsections < 3)
+ return;
+
/* Find the common section - always section 3. */
common_section = otree->sections + 3;
if (s->visible->type == coff_vis_common)
{
struct coff_where *w = s->where;
-
/* s->visible->type = coff_vis_ext_def; leave it as common */
common_section->size = align (common_section->size);
w->offset = common_section->size + common_section->address;
program_name = av[0];
xmalloc_set_program_name (program_name);
+ bfd_set_error_program_name (program_name);
expandargv (&ac, &av);
printf ("ids %d %d\n", base1, base2);
tree = coff_grok (abfd);
+ if (tree)
+ {
+ if (!noprescan)
+ prescan (tree);
- if (!noprescan)
- prescan (tree);
-
- wr_module (tree);
+ wr_module (tree);
+ }
return 0;
}