/* BFD back-end for mmo objects (MMIX-specific object-format).
- Copyright 2001
+ Copyright 2001, 2002
Free Software Foundation, Inc.
Written by Hans-Peter Nilsson (hp@bitrange.com).
Infrastructure and other bits originally copied from srec.c and
The mmo object format is used exclusively together with Professor
Donald E.@: Knuth's educational 64-bit processor MMIX. The simulator
- @emph{mmix} which is available at
- @emph{http://www-cs-faculty.stanford.edu/~knuth/programs/mmix.tar.gz}
+ @command{mmix} which is available at
+ @url{http://www-cs-faculty.stanford.edu/~knuth/programs/mmix.tar.gz}
understands this format. That package also includes a combined
- assembler and linker called @emph{mmixal}. The mmo format has
+ assembler and linker called @command{mmixal}. The mmo format has
no advantages feature-wise compared to e.g. ELF. It is a simple
non-relocatable object format with no support for archives or
debugging information, except for symbol value information and
line numbers (which is not yet implemented in BFD). See
- @emph{http://www-cs-faculty.stanford.edu/~knuth/mmix.html} for more
+ @url{http://www-cs-faculty.stanford.edu/~knuth/mmix.html} for more
information about MMIX. The ELF format is used for intermediate
object files in the BFD implementation.
two remaining bytes, called the @samp{Y} and @samp{Z} fields, or
the @samp{YZ} field (a 16-bit big-endian number), are used for
various purposes different for each lopcode. As documented in
- @emph{http://www-cs-faculty.stanford.edu/~knuth/mmixal-intro.ps.gz},
+ @url{http://www-cs-faculty.stanford.edu/~knuth/mmixal-intro.ps.gz},
the lopcodes are:
There is provision for specifying ``special data'' of 65536
PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
static long mmo_get_symtab_upper_bound PARAMS ((bfd *));
static long mmo_get_symtab PARAMS ((bfd *, asymbol **));
-static asymbol *mmo_make_empty_symbol PARAMS ((bfd *));
static void mmo_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *));
static void mmo_print_symbol PARAMS ((bfd *, PTR, asymbol *,
bfd_print_symbol_type));
Symbol table format
From mmixal.w (or really, the generated mmixal.tex) in
- @emph{http://www-cs-faculty.stanford.edu/~knuth/programs/mmix.tar.gz}):
+ @url{http://www-cs-faculty.stanford.edu/~knuth/programs/mmix.tar.gz}):
``Symbols are stored and retrieved by means of a @samp{ternary
search trie}, following ideas of Bentley and Sedgewick. (See
ACM--SIAM Symp.@: on Discrete Algorithms @samp{8} (1997), 360--369;
return symcount;
}
-/* Make an empty symbol. */
-
-static asymbol *
-mmo_make_empty_symbol (abfd)
- bfd *abfd;
-{
- asymbol *new = (asymbol *) bfd_zalloc (abfd, sizeof (asymbol));
-
- if (new)
- new->the_bfd = abfd;
- return new;
-}
-
/* Get information about a symbol. */
static void
/* FIXME: We can do better on this one, if we have a dwarf2 .debug_line
section or if MMO line numbers are implemented. */
#define mmo_find_nearest_line _bfd_nosymbols_find_nearest_line
+#define mmo_make_empty_symbol _bfd_generic_make_empty_symbol
#define mmo_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#define mmo_read_minisymbols _bfd_generic_read_minisymbols
#define mmo_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol