Bobby R. Bruce has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/22383 )

Change subject: base: Removing unused classes and headers from base/loader
......................................................................

base: Removing unused classes and headers from base/loader

These classes and headers are never used. They have therefore been
removed.

Change-Id: Idd80337419544d689fd6c9de277aae1d1cbd0421
---
M src/base/SConscript
D src/base/loader/aout_object.cc
D src/base/loader/aout_object.hh
D src/base/loader/coff_symconst.h
D src/base/loader/ecoff_object.cc
D src/base/loader/ecoff_object.hh
D src/base/loader/exec_aout.h
D src/base/loader/exec_ecoff.h
8 files changed, 0 insertions(+), 757 deletions(-)



diff --git a/src/base/SConscript b/src/base/SConscript
index d6615be..b124c1b 100644
--- a/src/base/SConscript
+++ b/src/base/SConscript
@@ -77,9 +77,7 @@
 GTest('trie.test', 'trie.test.cc')
 Source('types.cc')

-Source('loader/aout_object.cc')
 Source('loader/dtb_file.cc')
-Source('loader/ecoff_object.cc')
 Source('loader/elf_object.cc')
 Source('loader/image_file_data.cc')
 Source('loader/memory_image.cc')
diff --git a/src/base/loader/aout_object.cc b/src/base/loader/aout_object.cc
deleted file mode 100644
index 99713d9..0000000
--- a/src/base/loader/aout_object.cc
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 2003-2005 The Regents of The University of Michigan
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met: redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer;
- * redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution;
- * neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Authors: Steve Reinhardt
- */
-
-#include "base/loader/aout_object.hh"
-
-#include <string>
-
-#include "base/loader/exec_aout.h"
-#include "base/loader/symtab.hh"
-#include "base/trace.hh"
-#include "debug/Loader.hh"
-
-using namespace std;
-
-ObjectFile *
-AoutObjectFileFormat::load(ImageFileDataPtr ifd)
-{
-    if (!N_BADMAG(*(const aout_exechdr *)ifd->data()))
-        return new AoutObject(ifd);
-    else
-        return nullptr;
-}
-
-namespace
-{
-
-AoutObjectFileFormat aoutObjectFileFormat;
-
-} // anonymous namespace
-
-
-AoutObject::AoutObject(ImageFileDataPtr ifd) : ObjectFile(ifd)
-{
-    execHdr = (const aout_exechdr *)imageData->data();
-    entry = execHdr->entry;
-
-    // Right now this is only used for Alpha PAL code.
-    arch = Alpha;
-}
-
-MemoryImage
-AoutObject::buildImage() const
-{
-    MemoryImage image({
-            MemoryImage::Segment{ "text", N_TXTADDR(*execHdr), imageData,
-              N_TXTOFF(*execHdr), execHdr->tsize },
-            MemoryImage::Segment{ "data", N_DATADDR(*execHdr), imageData,
-              N_DATOFF(*execHdr), execHdr->dsize },
- MemoryImage::Segment{ "bss", N_BSSADDR(*execHdr), execHdr->bsize}
-    });
-
-    for (auto M5_VAR_USED &seg: image.segments())
-        DPRINTFR(Loader, "%s\n", seg);
-
-    return image;
-}
diff --git a/src/base/loader/aout_object.hh b/src/base/loader/aout_object.hh
deleted file mode 100644
index 480a30c..0000000
--- a/src/base/loader/aout_object.hh
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2003-2005 The Regents of The University of Michigan
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met: redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer;
- * redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution;
- * neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Authors: Steve Reinhardt
- */
-
-#ifndef __AOUT_OBJECT_HH__
-#define __AOUT_OBJECT_HH__
-
-#include "base/loader/object_file.hh"
-
-// forward decls: avoid including exec_aout.h here
-struct aout_exechdr;
-
-class AoutObject : public ObjectFile
-{
-  protected:
-    const aout_exechdr *execHdr;
-
-  public:
-    AoutObject(ImageFileDataPtr ifd);
-
-    MemoryImage buildImage() const override;
-};
-
-class AoutObjectFileFormat : public ObjectFileFormat
-{
-  public:
-    ObjectFile *load(ImageFileDataPtr data) override;
-};
-
-#endif // __AOUT_OBJECT_HH__
diff --git a/src/base/loader/coff_symconst.h b/src/base/loader/coff_symconst.h
deleted file mode 100644
index 1852911..0000000
--- a/src/base/loader/coff_symconst.h
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * Copyright (c) 2003, 2005-2006 The Regents of The University of Michigan
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met: redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer;
- * redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution;
- * neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Authors: Steve Reinhardt
- */
-
-/*
- * Taken from binutils-2.14.90.0.5 include/coff/symconst.h
- */
-
-/* Declarations of constants for internal format of MIPS ECOFF symbols.
-   Originally contributed by MIPS Computer Systems and Third Eye Software.
-   Changes contributed by Cygnus Support are in the public domain.
-
-   This file is just aggregated with the files that make up the GNU
-   release; it is not considered part of GAS, GDB, or other GNU
-   programs.  */
-
-/*
- * |-----------------------------------------------------------|
- * | Copyright (c) 1992, 1991, 1990 MIPS Computer Systems, Inc.|
- * | MIPS Computer Systems, Inc. grants reproduction and use   |
- * | rights to all parties, PROVIDED that this comment is      |
- * | maintained in the copy.                                   |
- * |-----------------------------------------------------------|
- */
-
-/* (C) Copyright 1984 by Third Eye Software, Inc.
- *
- * Third Eye Software, Inc. grants reproduction and use rights to
- * all parties, PROVIDED that this comment is maintained in the copy.
- *
- * Third Eye makes no claims about the applicability of this
- * symbol table to a particular use.
- */
-
-/* glevels for field in FDR */
-#define GLEVEL_0        2
-#define GLEVEL_1        1
-#define GLEVEL_2        0       /* for upward compat reasons. */
-#define GLEVEL_3        3
-
-/* magic number fo symheader */
-#define magicSym        0x7009
-/* The Alpha uses this value instead, for some reason.  */
-#define magicSym2       0x1992
-
-/* Language codes */
-#define langC           0
-#define langPascal      1
-#define langFortran     2
-#define langAssembler 3 /* one Assembley inst might map to many mach */
-#define langMachine     4
-#define langNil         5
-#define langAda         6
-#define langPl1         7
-#define langCobol       8
-#define langStdc 9 /* FIXME: Collides with SGI langCplusplus */
-#define langCplusplus   9       /* FIXME: Collides with langStdc */
-#define langCplusplusV2 10      /* SGI addition */
-#define langMax         11      /* maximun allowed 32 -- 5 bits */
-
-/* The following are value definitions for the fields in the SYMR */
-
-/*
- * Storage Classes
- */
-
-#define scNil           0
-#define scText          1       /* text symbol */
-#define scData          2       /* initialized data symbol */
-#define scBss           3       /* un-initialized data symbol */
-#define scRegister      4       /* value of symbol is register number */
-#define scAbs           5       /* value of symbol is absolute */
-#define scUndefined     6       /* who knows? */
-#define scCdbLocal      7       /* variable's value is IN se->va.?? */
-#define scBits          8       /* this is a bit field */
-#define scCdbSystem 9 /* variable's value is IN CDB's address space */
-#define scDbx           9       /* overlap dbx internal use */
-#define scRegImage      10      /* register value saved on stack */
-#define scInfo          11      /* symbol contains debugger information */
-#define scUserStruct 12 /* address in struct user for current process */
-#define scSData         13      /* load time only small data */
-#define scSBss          14      /* load time only small common */
-#define scRData         15      /* load time only read only data */
-#define scVar           16      /* Var parameter (fortran,pascal) */
-#define scCommon        17      /* common variable */
-#define scSCommon       18      /* small common */
-#define scVarRegister   19      /* Var parameter in a register */
-#define scVariant       20      /* Variant record */
-#define scSUndefined    21      /* small undefined(external) data */
-#define scInit          22      /* .init section symbol */
-#define scBasedVar      23      /* Fortran or PL/1 ptr based var */
-#define scXData         24      /* exception handling data */
-#define scPData         25      /* Procedure section */
-#define scFini          26      /* .fini section */
-#define scRConst        27      /* .rconst section */
-#define scMax           32
-
-
-/*
- *   Symbol Types
- */
-
-#define stNil           0       /* Nuthin' special */
-#define stGlobal        1       /* external symbol */
-#define stStatic        2       /* static */
-#define stParam         3       /* procedure argument */
-#define stLocal         4       /* local variable */
-#define stLabel         5       /* label */
-#define stProc          6       /*     "      "  Procedure */
-#define stBlock         7       /* beginnning of block */
-#define stEnd           8       /* end (of anything) */
-#define stMember 9 /* member (of anything - struct/union/enum */
-#define stTypedef       10      /* type definition */
-#define stFile          11      /* file name */
-#define stRegReloc      12      /* register relocation */
-#define stForward       13      /* forwarding address */
-#define stStaticProc    14      /* load time only static procs */
-#define stConstant      15      /* const */
-#define stStaParam      16      /* Fortran static parameters */
-    /* These new symbol types have been recently added to SGI machines. */
-#define stStruct 26 /* Beginning of block defining a struct type */ -#define stUnion 27 /* Beginning of block defining a union type */ -#define stEnum 28 /* Beginning of block defining an enum type */
-#define stIndirect      34      /* Indirect type specification */
-    /* Pseudo-symbols - internal to debugger */
-#define stStr           60      /* string */
-#define stNumber        61      /* pure number (ie. 4 NOR 2+2) */
-#define stExpr          62      /* 2+2 vs. 4 */
-#define stType          63      /* post-coersion SER */
-#define stMax           64
-
-/* definitions for fields in TIR */
-
-/* type qualifiers for ti.tq0 -> ti.(itqMax-1) */
-#define tqNil   0       /* bt is what you see */
-#define tqPtr   1       /* pointer */
-#define tqProc  2       /* procedure */
-#define tqArray 3       /* duh */
-#define tqFar   4       /* longer addressing - 8086/8 land */
-#define tqVol   5       /* volatile */
-#define tqConst 6       /* const */
-#define tqMax   8
-
-/* basic types as seen in ti.bt */
-#define btNil           0       /* undefined (also, enum members) */
-#define btAdr 1 /* address - integer same size as pointer */
-#define btChar          2       /* character */
-#define btUChar         3       /* unsigned character */
-#define btShort         4       /* short */
-#define btUShort        5       /* unsigned short */
-#define btInt           6       /* int */
-#define btUInt          7       /* unsigned int */
-#define btLong          8       /* long */
-#define btULong         9       /* unsigned long */
-#define btFloat         10      /* float (real) */
-#define btDouble        11      /* Double (real) */
-#define btStruct        12      /* Structure (Record) */
-#define btUnion         13      /* Union (variant) */
-#define btEnum          14      /* Enumerated */
-#define btTypedef       15      /* defined via a typedef, isymRef points */
-#define btRange         16      /* subrange of int */
-#define btSet           17      /* pascal sets */
-#define btComplex       18      /* fortran complex */
-#define btDComplex      19      /* fortran double complex */
-#define btIndirect      20      /* forward or unnamed typedef */
-#define btFixedDec      21      /* Fixed Decimal */
-#define btFloatDec      22      /* Float Decimal */
-#define btString        23      /* Varying Length Character String */
-#define btBit           24      /* Aligned Bit String */
-#define btPicture       25      /* Picture */
-#define btVoid          26      /* void */
-#define btLongLong      27      /* long long */
-#define btULongLong     28      /* unsigned long long */
-#define btMax           64
diff --git a/src/base/loader/ecoff_object.cc b/src/base/loader/ecoff_object.cc
deleted file mode 100644
index 7af2c7a..0000000
--- a/src/base/loader/ecoff_object.cc
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * Copyright (c) 2003-2005 The Regents of The University of Michigan
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met: redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer;
- * redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution;
- * neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Authors: Steve Reinhardt
- */
-
-#include "base/loader/ecoff_object.hh"
-
-#include <string>
-
-#include "base/loader/symtab.hh"
-#include "base/logging.hh"
-#include "base/trace.hh"
-#include "base/types.hh"
-#include "debug/Loader.hh"
-
-// Only alpha will be able to load ecoff files for now.
-// base/types.hh and ecoff_machdep.h must be before the other .h files
-// because they are are gathered from other code bases and require some
-// typedefs from those files.
-#include "arch/alpha/ecoff_machdep.h"
-#include "base/loader/coff_sym.h"
-#include "base/loader/coff_symconst.h"
-#include "base/loader/exec_ecoff.h"
-
-using namespace std;
-
-ObjectFile *
-EcoffObjectFormat::load(ImageFileDataPtr ifd)
-{
-    if (((const ecoff_filehdr *)ifd->data())->f_magic == ECOFF_MAGIC_ALPHA)
-        return new EcoffObject(ifd);
-    else
-        return nullptr;
-}
-
-namespace
-{
-
-EcoffObjectFormat ecoffObjectFormat;
-
-} // anonymous namespace
-
-
-EcoffObject::EcoffObject(ImageFileDataPtr ifd) : ObjectFile(ifd)
-{
-    execHdr = (const ecoff_exechdr *)imageData->data();
-    fileHdr = &(execHdr->f);
-    aoutHdr = &(execHdr->a);
-
-    entry = aoutHdr->entry;
-    // it's Alpha ECOFF
-    arch = Alpha;
-    opSys = Tru64;
-}
-
-MemoryImage
-EcoffObject::buildImage() const
-{
-    MemoryImage image({
-            { "text", aoutHdr->text_start, imageData,
-              ECOFF_TXTOFF(execHdr), aoutHdr->tsize },
-            { "data", aoutHdr->data_start, imageData,
-              ECOFF_DATOFF(execHdr), aoutHdr->dsize },
-            { "bss", aoutHdr->bss_start, aoutHdr->bsize }
-    });
-
-    for (auto M5_VAR_USED &seg: image.segments())
-        DPRINTFR(Loader, "%s\n", seg);
-
-    return image;
-}
-
-bool
-EcoffObject::loadAllSymbols(SymbolTable *symtab, Addr base, Addr offset,
-                            Addr addr_mask)
-{
-    bool retval = loadGlobalSymbols(symtab, base, offset, addr_mask);
-    retval = retval && loadLocalSymbols(symtab, base, offset, addr_mask);
-    return retval;
-}
-
-bool
-EcoffObject::loadGlobalSymbols(SymbolTable *symtab, Addr base, Addr offset,
-                               Addr addr_mask)
-{
-    if (!symtab)
-        return false;
-
-    if (fileHdr->f_magic != ECOFF_MAGIC_ALPHA) {
- warn("loadGlobalSymbols: wrong magic on %s\n", imageData->filename());
-        return false;
-    }
-
- auto *syms = (const ecoff_symhdr *)(imageData->data() + fileHdr->f_symptr);
-    if (syms->magic != magicSym2) {
-        warn("loadGlobalSymbols: bad symbol header magic on %s\n",
-                imageData->filename());
-        return false;
-    }
-
-    auto *ext_syms = (const ecoff_extsym *)(
-            imageData->data() + syms->cbExtOffset);
-
-    auto *ext_strings =
-        (const char *)(imageData->data() + syms->cbSsExtOffset);
-    for (int i = 0; i < syms->iextMax; i++) {
-        const ecoff_sym *entry = &(ext_syms[i].asym);
-        if (entry->iss != -1)
-            symtab->insert(entry->value, ext_strings + entry->iss);
-    }
-
-    return true;
-}
-
-bool
-EcoffObject::loadLocalSymbols(SymbolTable *symtab, Addr base, Addr offset,
-                              Addr addr_mask)
-{
-    if (!symtab)
-        return false;
-
-    if (fileHdr->f_magic != ECOFF_MAGIC_ALPHA) {
- warn("loadGlobalSymbols: wrong magic on %s\n", imageData->filename());
-        return false;
-    }
-
- auto *syms = (const ecoff_symhdr *)(imageData->data() + fileHdr->f_symptr);
-    if (syms->magic != magicSym2) {
-        warn("loadGlobalSymbols: bad symbol header magic on %s\n",
-                imageData->filename());
-        return false;
-    }
-
-    auto *local_syms =
-        (const ecoff_sym *)(imageData->data() + syms->cbSymOffset);
- auto *local_strings = (const char *)(imageData->data() + syms->cbSsOffset); - auto *fdesc = (const ecoff_fdr *)(imageData->data() + syms->cbFdOffset);
-
-    for (int i = 0; i < syms->ifdMax; i++) {
-        auto *entry = (const ecoff_sym *)(local_syms + fdesc[i].isymBase);
-        auto *strings = (const char *)(local_strings + fdesc[i].issBase);
-        for (int j = 0; j < fdesc[i].csym; j++) {
-            if (entry[j].st == stGlobal || entry[j].st == stProc)
-                if (entry[j].iss != -1)
-                    symtab->insert(entry[j].value, strings + entry[j].iss);
-        }
-    }
-
-    for (int i = 0; i < syms->isymMax; i++) {
-        const ecoff_sym *entry = &(local_syms[i]);
-        if (entry->st == stProc)
-            symtab->insert(entry->value, local_strings + entry->iss);
-    }
-
-    return true;
-}
diff --git a/src/base/loader/ecoff_object.hh b/src/base/loader/ecoff_object.hh
deleted file mode 100644
index 9e6c533..0000000
--- a/src/base/loader/ecoff_object.hh
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 2003-2005 The Regents of The University of Michigan
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met: redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer;
- * redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution;
- * neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Authors: Steve Reinhardt
- */
-
-#ifndef __BASE_LOADER_ECOFF_OBJECT_HH__
-#define __BASE_LOADER_ECOFF_OBJECT_HH__
-
-#include "base/loader/object_file.hh"
-
-// forward decls: avoid including exec_ecoff.h here
-struct ecoff_exechdr;
-struct ecoff_filehdr;
-struct ecoff_aouthdr;
-
-class EcoffObjectFormat : public ObjectFileFormat
-{
-  public:
-    ObjectFile *load(ImageFileDataPtr data) override;
-};
-
-class EcoffObject : public ObjectFile
-{
-  protected:
-    const ecoff_exechdr *execHdr;
-    const ecoff_filehdr *fileHdr;
-    const ecoff_aouthdr *aoutHdr;
-
-  public:
-    EcoffObject(ImageFileDataPtr ifd);
-
-    MemoryImage buildImage() const override;
-
-    bool loadAllSymbols(SymbolTable *symtab, Addr base=0,
-                        Addr offset=0, Addr addr_mask=MaxAddr) override;
-    bool loadGlobalSymbols(SymbolTable *symtab, Addr base=0,
-                           Addr offset=0, Addr addr_mask=MaxAddr) override;
-    bool loadLocalSymbols(SymbolTable *symtab, Addr base=0,
-                          Addr offset=0, Addr addr_mask=MaxAddr) override;
-};
-
-#endif // __BASE_LOADER_ECOFF_OBJECT_HH__
diff --git a/src/base/loader/exec_aout.h b/src/base/loader/exec_aout.h
deleted file mode 100644
index eed44ba..0000000
--- a/src/base/loader/exec_aout.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Taken from NetBSD sys/exec_aout.h
- */
-
-/*     $NetBSD: exec_aout.h,v 1.29 2002/12/10 17:14:31 thorpej Exp $   */
-
-/*
- * Copyright (c) 1993, 1994 Christopher G. Demetriou
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- * This product includes software developed by Christopher G. Demetriou.
- * 4. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _SYS_EXEC_AOUT_H_
-#define _SYS_EXEC_AOUT_H_
-
-#ifndef N_PAGSIZ
-#define        N_PAGSIZ(ex)    (AOUT_LDPGSZ)
-#endif
-
-/* a_magic */
-#define        OMAGIC          0407    /* old impure format */
-#define        NMAGIC          0410    /* read-only text */
-#define        ZMAGIC          0413    /* demand load format */
-
-#define        N_ALIGN(ex,x) \
-        (N_GETMAGIC(ex) == ZMAGIC ? \
-        ((x) + AOUT_LDPGSZ - 1) & ~(AOUT_LDPGSZ - 1) : (x))
-
-/* Valid magic number check. */
-#define        N_BADMAG(ex) \
-        (N_GETMAGIC(ex) != NMAGIC && N_GETMAGIC(ex) != OMAGIC && \
-        N_GETMAGIC(ex) != ZMAGIC)
-
-//Only alpha will be able to load aout for now
-#include "arch/alpha/aout_machdep.h"
-
-#endif /* !_SYS_EXEC_AOUT_H_ */
diff --git a/src/base/loader/exec_ecoff.h b/src/base/loader/exec_ecoff.h
deleted file mode 100644
index a076afb..0000000
--- a/src/base/loader/exec_ecoff.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Taken from NetBSD sys/exec_ecoff.h
- */
-
-/*     $NetBSD: exec_ecoff.h,v 1.13 2003/01/18 09:53:18 thorpej Exp $  */
-
-/*
- * Copyright (c) 1994 Adam Glass
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *      This product includes software developed by Adam Glass.
- * 4. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef        _SYS_EXEC_ECOFF_H_
-#define        _SYS_EXEC_ECOFF_H_
-
-struct ecoff_filehdr {
-        coff_ushort f_magic;   /* magic number */
-        coff_ushort f_nscns;   /* # of sections */
-        coff_uint   f_timdat;  /* time and date stamp */
-        coff_ulong  f_symptr;  /* file offset of symbol table */
-        coff_uint   f_nsyms;   /* # of symbol table entries */
-        coff_ushort f_opthdr;  /* sizeof the optional header */
-        coff_ushort f_flags;   /* flags??? */
-};
-
-struct ecoff_aouthdr {
-        coff_ushort magic;
-        coff_ushort vstamp;
-        ECOFF_PAD
-        coff_ulong  tsize;
-        coff_ulong  dsize;
-        coff_ulong  bsize;
-        coff_ulong  entry;
-        coff_ulong  text_start;
-        coff_ulong  data_start;
-        coff_ulong  bss_start;
-        ECOFF_MACHDEP;
-};
-
-struct ecoff_scnhdr {          /* needed for size info */
-        char   s_name[8];      /* name */
-        coff_ulong  s_paddr;   /* physical addr? for ROMing?*/
-        coff_ulong  s_vaddr;   /* virtual addr? */
-        coff_ulong  s_size;            /* size */
-        coff_ulong  s_scnptr;  /* file offset of raw data */
-        coff_ulong  s_relptr;  /* file offset of reloc data */
-        coff_ulong  s_lnnoptr; /* file offset of line data */
-        coff_ushort s_nreloc;  /* # of relocation entries */
-        coff_ushort s_nlnno;   /* # of line entries */
-        coff_uint   s_flags;   /* flags */
-};
-
-struct ecoff_exechdr {
-        struct ecoff_filehdr f;
-        struct ecoff_aouthdr a;
-};
-
-#define ECOFF_HDR_SIZE (sizeof(struct ecoff_exechdr))
-
-#define ECOFF_OMAGIC 0407
-#define ECOFF_NMAGIC 0410
-#define ECOFF_ZMAGIC 0413
-
-#define ECOFF_ROUND(value, by) \
-        (((value) + (by) - 1) & ~((by) - 1))
-
-#define ECOFF_BLOCK_ALIGN(ep, value) \
- ((ep)->a.magic == ECOFF_ZMAGIC ? ECOFF_ROUND((value), ECOFF_LDPGSZ) : \
-         (value))
-
-#define ECOFF_TXTOFF(ep) \
-        ((ep)->a.magic == ECOFF_ZMAGIC ? 0 : \
-         ECOFF_ROUND(ECOFF_HDR_SIZE + (ep)->f.f_nscns * \
- sizeof(struct ecoff_scnhdr), ECOFF_SEGMENT_ALIGNMENT(ep)))
-
-#define ECOFF_DATOFF(ep) \
-        (ECOFF_BLOCK_ALIGN((ep), ECOFF_TXTOFF(ep) + (ep)->a.tsize))
-
-#define ECOFF_SEGMENT_ALIGN(ep, value) \
- (ECOFF_ROUND((value), ((ep)->a.magic == ECOFF_ZMAGIC ? ECOFF_LDPGSZ : \
-         ECOFF_SEGMENT_ALIGNMENT(ep))))
-
-#endif /* !_SYS_EXEC_ECOFF_H_ */

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/22383
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: Idd80337419544d689fd6c9de277aae1d1cbd0421
Gerrit-Change-Number: 22383
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to