header.h 1.3 KB
/*
 * Copyright (C) 1998 by the Board of Trustees
 *    of Leland Stanford Junior University.
 * Copyright (C) 1998 Digital Equipment Corporation
 *
 * This file is part of the SimOS distribution.
 * See LICENSE file for terms of the license.
 *
 */

#ifndef _HEADER_H_
#define _HEADER_H_

/*
 * The structure to hold the data read from the header of a COFF executable
 */
struct header {

    /* private data */
    ulong data_start;		
    ulong data_size;		
    ulong data_seek;

    /* this has the total size of all the data segments */
    ulong total_data_size;

    /* bss - block started by symbol */
    ulong bss_start;
    ulong bss_size;
    ulong bss_seek;
    
    /* read only data */
    ulong rdata_start;		
    ulong rdata_size;		
    ulong rdata_seek;
    
    /* exeception data */
    ulong pdata_start;
    ulong pdata_size;
    ulong pdata_seek;
    
    /* read only constant data */
    ulong rconst_start;
    ulong rconst_size;
    ulong rconst_seek;
    
    /* text segment */
    ulong text_start;
    ulong text_size;
    ulong text_seek;

    /* small data */
    ulong sdata_seek;
    
    /* one last thing - global pointer */
    ulong gp;

} header_t;

/* data structures for the text cache */
typedef struct text_cache {
    char *path;
    void *p;
}text_cache_t;
    
#endif /* _HEADER_H_ */