home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / c / condor40.zip / CONDOR / src / h / coff_desc.h < prev    next >
Text File  |  1989-08-30  |  1KB  |  54 lines

  1. typedef struct filehdr    FILE_HDR;
  2. typedef struct scnhdr    SCN_HDR;
  3. typedef struct aouthdr    AOUT_HDR;
  4.  
  5. #define FILE_HDR_SIZ    sizeof(FILE_HDR)
  6. #define SCN_HDR_SIZ        sizeof(SCN_HDR)
  7. #define AOUT_HDR_SIZ    sizeof(AOUT_HDR)
  8.  
  9. /* Apparently MIPS file headers contain byte counts rather than structure
  10.    counts. -- mike
  11. #define RELOC_SIZ        sizeof(RELOC)
  12. #define SYM_SIZ            sizeof(struct syment)
  13. #define LINENO_SIZ        sizeof(struct lineno)
  14. */
  15. #define RELOC_SIZ        1
  16. #define SYM_SIZ            1
  17. #define LINENO_SIZ        1
  18.  
  19. typedef struct {
  20.     int        fd;
  21.     int        offset;
  22.     int        len;
  23. } FILE_BLOCK;
  24.  
  25. typedef struct {
  26.     char    *data;
  27.     int        len;
  28. } CORE_BLOCK;
  29.  
  30. typedef struct {
  31.     int        block_tag;
  32.     union {
  33.         FILE_BLOCK    file_block;
  34.         CORE_BLOCK    core_block;
  35.     } block_val;
  36. } DATA_BLOCK;
  37. #define FILE_DATA    1
  38. #define CORE_DATA    2
  39.     
  40. typedef struct {
  41.     SCN_HDR            *hdr;
  42.     DATA_BLOCK        raw_data;
  43.     DATA_BLOCK        reloc_info;
  44.     DATA_BLOCK        lineno_info;
  45. } SECTION;
  46.  
  47. typedef struct {
  48.     FILE_HDR        *file_hdr;
  49.     AOUT_HDR        *aout_hdr;
  50.     SECTION            *section;    /* allocate and access as an array */
  51.     DATA_BLOCK        sym_tab_loc;
  52.     DATA_BLOCK        str_tab_loc;
  53. } COFF_DESC;
  54.