New loader structure. Expand Nate's ObjectFile to automatically detect file formats
authorSteve Reinhardt <stever@eecs.umich.edu>
Wed, 8 Oct 2003 06:13:01 +0000 (23:13 -0700)
committerSteve Reinhardt <stever@eecs.umich.edu>
Wed, 8 Oct 2003 06:13:01 +0000 (23:13 -0700)
commite475dba424d70e99646f897fae832f87b1cf15cf
tree04acc02acfc77419aaf80a26e03b4ccf742838cc
parent998d2914db377d5236d6241e3c839af1728c36e7
New loader structure.  Expand Nate's ObjectFile to automatically detect file formats
and generate an appropriate child object, which knows how to load its text & data into memory
(and symbols, for ecoff only at this point).  Ecoff format supports Tru64 binaries, kernel, and
console.  A.out format is used by PAL code.  Elf support is there and appears to work for
Alpha/Linux binaries, but awaits a Linux syscall emulation layer before further testing.

arch/alpha/ecoff_machdep.h:
base/coff_sym.h:
base/coff_symconst.h:
base/exec_ecoff.h:
    Add Id string & provenance comment, clean up types
base/object_file.cc:
base/object_file.hh:
    Add auto format detection and text/data loading.
sim/prog.cc:
    Moved binary loading & stack setup here (was in arch/alpha/loader.cc).  Some of this is
    platform-dependent, but I think most of it is not.  We'll factor out the platform-dependent
    parts when the need arises.
sim/prog.hh:
    Get rid of unused environ_base field.
sim/system.cc:
    Use new ObjectFile loader structure for console, kernel, & palcode.

--HG--
extra : convert_revision : 8eae509bf71cf204bc3ec78c68699cfd01baed97
17 files changed:
arch/alpha/aout_machdep.h [new file with mode: 0644]
arch/alpha/ecoff_machdep.h [new file with mode: 0644]
base/aout_object.cc [new file with mode: 0644]
base/aout_object.hh [new file with mode: 0644]
base/coff_sym.h [new file with mode: 0644]
base/coff_symconst.h [new file with mode: 0644]
base/ecoff_object.cc [new file with mode: 0644]
base/ecoff_object.hh [new file with mode: 0644]
base/elf_object.cc [new file with mode: 0644]
base/elf_object.hh [new file with mode: 0644]
base/exec_aout.h [new file with mode: 0644]
base/exec_ecoff.h [new file with mode: 0644]
base/object_file.cc
base/object_file.hh
sim/prog.cc
sim/prog.hh
sim/system.cc