home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / language / sozobon2 / ld.h < prev    next >
C/C++ Source or Header  |  1993-10-23  |  2KB  |  102 lines

  1. /* Copyright (c) 1988 by Sozobon, Limited.  Author: Johann Ruegg
  2.  *
  3.  * Permission is granted to anyone to use this software for any purpose
  4.  * on any computer system, and to redistribute it freely, with the
  5.  * following restrictions:
  6.  * 1) No charge may be made other than reasonable charges for reproduction.
  7.  * 2) Modified versions must be clearly marked as such.
  8.  * 3) The authors are not responsible for any harmful consequences
  9.  *    of using this software, even if they result from defects in it.
  10.  */
  11.  
  12. #ifdef NULL
  13. #undef NULL
  14. #endif
  15. #define NULL    0L
  16.  
  17. #ifdef dLibs
  18. #define    OPENBR(x)    open(x,0)
  19. #define OPENBW(x)    creat(x,0)
  20. #else
  21. FILE *fopen();
  22. #define OPENBR(x)    openb(x,0)
  23. #define OPENBW(x)    openb(x,1)
  24. #endif
  25.  
  26. #define MAXFI    60    /* max no. of files */
  27. #define MAXSYM    1000    /* max global syms in final obj */
  28. #define MAXLOC    400    /* max syms in one .o */
  29. #define MAXOBJ    100    /* max objects actually loaded */
  30. #define MAXLIB    200    /* max library objects skipped */
  31.  
  32. #define NHASH    64    /* power of 2 */
  33. #define HMASK    0x3f    /* bits for NHASH */
  34.  
  35. #define AMAGIC    0xff65
  36. #define OMAGIC    0x601a
  37.  
  38. struct hdr {
  39.     int magic;
  40.     long tsize, dsize, bsize;
  41.     long syms;
  42.     long f1,f2;
  43.     int f3;
  44. } h;
  45.  
  46. struct finfo {
  47.     char *fname;
  48.     int fd;
  49. } files[MAXFI];
  50. int nfiles;
  51.  
  52. struct oinfo {
  53.     int    fno;
  54.     char aname[14];
  55.     struct hdr oh;
  56.     long tbase, dbase, bbase;
  57.     long im_td, im_rel;
  58.     char *im_sym;
  59. } obj[MAXOBJ];
  60. int nobj;
  61.  
  62. struct skipstr {
  63.     long offs;
  64.     char aname[14];
  65.     struct hdr oh;
  66.     char *ims;
  67. };
  68. struct skipstr *skip;
  69. int nskip;
  70.  
  71. struct sym {
  72.     char name[8];
  73.     char flags;
  74.     char mark;
  75.     long value;
  76. };
  77. struct sym *lsym;
  78.  
  79. struct sinfo {
  80.     int onum;
  81.     struct sym sy;
  82.     struct sinfo *hchain;
  83. } sym[MAXSYM];
  84. int nsym;
  85.  
  86. struct arch {
  87.     char anm[14];
  88.     long modti;
  89.     long amagic;
  90.     long asize;
  91.     int fill;
  92. };
  93.  
  94. struct sinfo *hashs[NHASH];
  95.  
  96. #define LBUFSZ    6000
  97. #define LBUFCNT    (LBUFSZ/2)
  98. short *lbuf;
  99. short *rbuf;
  100.  
  101. long textsize, datasize, bsssize, comsize;
  102.