/*
    Copyright 2001 (c) by Boris Lutz,
    Swiss Federal Institute of Technology,
    Computer Engineering and Networks Laboratory.
 
    TOPSY -- A Teachable Operating System.
             Implementation of a tiny and simple
             micro kernel for teaching purposes.
 
    For further information, please visit http://www.tik.ee.ethz.ch/~topsy
 
    This software is provided under the terms of the GNU General Public 
    Licence. A full copy of the GNU GPL is provided in the file COPYING 
    found in the development root of Topsy.
*/
/*
	
    File:                  $Source: /home/ruf/cvs_Topsy/cvs/Topsy/VMemory/Attic/vm_loader.h,v $
    Affiliation:           ETH Zuerich, TIK
    Version:               $Revision: 2922 $
    Last Date of Change:   $Date: 2007-03-19 17:48:52 +0100 (Mon, 19 Mär 2007) $  by: $Author: baderma $
 
*/


#ifndef VMLOADER_H
#define VMLOADER_H


/*** my linked string search list ***/
typedef struct slList_t
{
  address_t		prev;
  address_t		next;
  offset_t		txtStart;
  size_t		txtSize;
  offset_t		datStart;
  size_t		datSize;
  offset_t		bssStart;
  size_t		bssSize;
  char			name[256];
}
slList;

/*** the file header ***/
typedef struct topsyHead
{
  char			name[16];
  uint64		textstart;
  uint64		textsize;
  uint64		datastart;
  uint64		datasize;
  uint64		bssstart;
  uint64		bsssize;
  uint64		optsegment;
  uint64		optsegmentsize;
}
topsyHeadEntry_t;
typedef topsyHeadEntry_t *topsyHead_t;

/*** return values ***/
#define LD_OK			 0
#define LD_FAIL		-1

/*** function prototypes ***/
void vm_loader(ThreadArg arg);


#endif
