9ce5dc4c6f4984c3ba1402dc7bff8f9149c438d3
[fw/sdcc] / as / mcs51 / aslink.h
1 /* aslink.h */
2
3 /*
4  * (C) Copyright 1989-1995
5  * All Rights Reserved
6  *
7  * Alan R. Baldwin
8  * 721 Berkeley St.
9  * Kent, Ohio  44240
10  *
11  * 28-Oct-97 JLH: 
12  *           - add proto for StoreString
13  *           - change s_id from [NCPS] to pointer
14  *           - change NCPS to 80
15  *           - case sensitive
16  *           - add R_J11 for 8051 assembler
17  * 31-Oct-97 JLH: 
18  *           - add jflag and jfp for NoICE output
19  * 30-Jan-98 JLH:
20  *           - add memory space flags to a_flag for 8051
21  */
22
23 #define VERSION "V01.70 + NoICE + SDCC Feb 1999"
24
25 /*
26  * Case Sensitivity Flag
27  */
28 #define CASE_SENSITIVE  1
29
30 /*)Module       asmlnk.h
31  *
32  *      The module asmlnk.h contains the definitions for constants,
33  *      structures, global variables, and LKxxxx functions
34  *      contained in the LKxxxx.c files.
35  */
36
37 /*)BUILD
38         $(PROGRAM) =    ASLINK
39         $(INCLUDE) =    ASLINK.H
40         $(FILES) = {
41                 LKMAIN.C
42                 LKLEX.C
43                 LKAREA.C
44                 LKHEAD.C
45                 LKSYM.C
46                 LKEVAL.C
47                 LKDATA.C
48                 LKLIST.C
49                 LKRLOC.C
50                 LKLIBR.C
51                 LKS19.C
52                 LKIHX.C
53         }
54         $(STACK) = 2000
55 */
56
57 /* DECUS C void definition */
58 /* File/extension seperator */
59
60 #ifdef  decus
61 #define VOID    char
62 #define FSEPX   '.'
63 #endif
64
65 /* PDOS C void definition */
66 /* File/extension seperator */
67
68 #ifdef  PDOS
69 #define VOID    char
70 #define FSEPX   ':'
71 #endif
72
73 /* Default void definition */
74 /* File/extension seperator */
75
76 #ifndef VOID
77 #define VOID    void
78 #define FSEPX   '.'
79 #define OTHERSYSTEM 
80 #endif
81
82 /*
83  * PATH_AMX
84  */
85 #include <limits.h>
86 #ifndef PATH_MAX                /* POSIX, but not required   */
87 #define PATH_MAX 255            /* define a reasonable value */
88 #endif
89
90 /*
91  * This file defines the format of the
92  * relocatable binary file.
93  */
94
95 #define NCPS    80              /* characters per symbol (JLH: change from 8) */
96 #define NDATA   16              /* actual data */
97 #define NINPUT  PATH_MAX        /* Input buffer size */
98 #define NHASH   64              /* Buckets in hash table */
99 #define HMASK   077             /* Hash mask */
100 #define NLPP    60              /* Lines per page */
101 #define NTXT    16              /* T values */
102
103 /*
104  *      The "R_" relocation constants define values used in
105  *      generating the assembler relocation output data for
106  *      areas, symbols, and code.
107  *
108  *
109  *      Relocation types.
110  *
111  *             7     6     5     4     3     2     1     0
112  *          +-----+-----+-----+-----+-----+-----+-----+-----+
113  *          | MSB | PAGn| PAG0| USGN| BYT2| PCR | SYM | BYT |
114  *          +-----+-----+-----+-----+-----+-----+-----+-----+
115  */
116
117 #define R_WORD  0x00            /* 16 bit */
118 #define R_BYTE  0x01            /*  8 bit */
119
120 #define R_AREA  0x00            /* Base type */
121 #define R_SYM   0x02
122
123 #define R_NORM  0x00            /* PC adjust */
124 #define R_PCR   0x04
125
126 #define R_BYT1  0x00            /* Byte count for R_BYTE = 1 */
127 #define R_BYT2  0x08            /* Byte count for R_BYTE = 2 */
128
129 #define R_SGND  0x00            /* Signed Byte */
130 #define R_USGN  0x10            /* Unsigned Byte */
131
132 #define R_NOPAG 0x00            /* Page Mode */
133 #define R_PAG0  0x20            /* Page '0' */
134 #define R_PAG   0x40            /* Page 'nnn' */
135
136 #define R_LSB   0x00            /* low byte */
137 #define R_MSB   0x80            /* high byte */
138
139 #define R_BYT3  0x100           /* if R_BYTE is set, this is a 
140                                  * 3 byte address, of which
141                                  * the linker must select one byte.
142                                  */
143 #define R_HIB   0x200           /* If R_BYTE & R_BYT3 are set, linker
144                                  * will select byte 3 of the relocated
145                                  * 24 bit address.
146                                  */
147
148 #define R_J11   (R_WORD|R_BYT2) /* JLH: 11 bit JMP and CALL (8051) */
149 #define R_J19   (R_WORD|R_BYT2|R_MSB) /* 19 bit JMP/CALL (DS80C390) */
150 #define R_C24   (R_WORD|R_BYT1|R_MSB) /* 24 bit address (DS80C390) */
151 #define R_J19_MASK (R_BYTE|R_BYT2|R_MSB)
152
153 #define IS_R_J19(x) (((x) & R_J19_MASK) == R_J19)
154 #define IS_R_J11(x) (((x) & R_J19_MASK) == R_J11)
155 #define IS_C24(x) (((x) & R_J19_MASK) == R_C24)
156
157 #define R_ESCAPE_MASK   0xf0    /* Used to escape relocation modes
158                                  * greater than 0xff in the .rel
159                                  * file.
160                                  */
161
162 /*
163  * Global symbol types.
164  */
165 #define S_REF   1               /* referenced */
166 #define S_DEF   2               /* defined */
167
168 /*
169  * Area type flags
170  */
171 #define A_CON   0000            /* concatenate */
172 #define A_OVR   0004            /* overlay */
173 #define A_REL   0000            /* relocatable */
174 #define A_ABS   0010            /* absolute */
175 #define A_NOPAG 0000            /* non-paged */
176 #define A_PAG   0020            /* paged */
177
178 /* Additional flags for 8051 address spaces */
179 #define A_DATA  0000            /* data space (default)*/
180 #define A_CODE  0040            /* code space */
181 #define A_XDATA 0100            /* external data space */
182 #define A_BIT   0200            /* bit addressable space */
183
184 /*
185  * File types
186  */
187 #define F_STD   1               /* stdin */
188 #define F_LNK   2               /* File.lnk */
189 #define F_REL   3               /* File.rel */
190
191 /*
192  *      General assembler address type
193  */
194 typedef unsigned int Addr_T;
195
196 /*
197  *      The structures of head, area, areax, and sym are created
198  *      as the REL files are read during the first pass of the
199  *      linker.  The struct head is created upon encountering a
200  *      H directive in the REL file.  The structure contains a
201  *      link to a link file structure (struct lfile) which describes
202  *      the file containing the H directive, the number of data/code
203  *      areas contained in this header segment, the number of
204  *      symbols referenced/defined in this header segment, a pointer
205  *      to an array of pointers to areax structures (struct areax)
206  *      created as each A directive is read, and a pointer to an
207  *      array of pointers to symbol structures (struct sym) for
208  *      all referenced/defined symbols.  As H directives are read
209  *      from the REL files a linked list of head structures is
210  *      created by placing a link to the new head structure
211  *      in the previous head structure.
212  */
213 struct  head
214 {
215         struct  head   *h_hp;   /* Header link */
216         struct  lfile  *h_lfile;/* Associated file */
217         int     h_narea;        /* # of areas */
218         struct  areax **a_list; /* Area list */
219         int     h_nglob;        /* # of global symbols */
220         struct  sym   **s_list; /* Globle symbol list */
221         char    m_id[NCPS];     /* Module name */
222 };
223
224 /*
225  *      A structure area is created for each 'unique' data/code
226  *      area definition found as the REL files are read.  The
227  *      struct area contains the name of the area, a flag byte
228  *      which contains the area attributes (REL/CON/OVR/ABS),
229  *      an area subtype (not used in this assembler), and the
230  *      area base address and total size which will be filled
231  *      in at the end of the first pass through the REL files.
232  *      As A directives are read from the REL files a linked
233  *      list of unique area structures is created by placing a
234  *      link to the new area structure in the previous area structure.
235  */
236 struct  area
237 {
238         struct  area    *a_ap;  /* Area link */
239         struct  areax   *a_axp; /* Area extension link */
240         Addr_T  a_addr;         /* Beginning address of area */
241         Addr_T  a_size;         /* Total size of the area */
242         char    a_type;         /* Area subtype */
243         char    a_flag;         /* Flag byte */
244         char    a_id[NCPS];     /* Name */
245 };
246
247 /*
248  *      An areax structure is created for every A directive found
249  *      while reading the REL files.  The struct areax contains a
250  *      link to the 'unique' area structure referenced by the A
251  *      directive and to the head structure this area segment is
252  *      a part of.  The size of this area segment as read from the
253  *      A directive is placed in the areax structure.  The beginning
254  *      address of this segment will be filled in at the end of the
255  *      first pass through the REL files.  As A directives are read
256  *      from the REL files a linked list of areax structures is
257  *      created for each unique area.  The final areax linked
258  *      list has at its head the 'unique' area structure linked
259  *      to the linked areax structures (one areax structure for
260  *      each A directive for this area).
261  */
262 struct  areax
263 {
264         struct  areax   *a_axp; /* Area extension link */
265         struct  area    *a_bap; /* Base area link */
266         struct  head    *a_bhp; /* Base header link */
267         Addr_T  a_addr;         /* Beginning address of section */
268         Addr_T  a_size;         /* Size of the area in section */
269 };
270
271 /*
272  *      A sym structure is created for every unique symbol
273  *      referenced/defined while reading the REL files.  The
274  *      struct sym contains the symbol's name, a flag value
275  *      (not used in this linker), a symbol type denoting
276  *      referenced/defined, and an address which is loaded
277  *      with the relative address within the area in which
278  *      the symbol was defined.  The sym structure also
279  *      contains a link to the area where the symbol was defined.
280  *      The sym structures are linked into linked lists using
281  *      the symbol link element.
282  */
283 struct  sym
284 {
285         struct  sym     *s_sp;  /* Symbol link */
286         struct  areax   *s_axp; /* Symbol area link */
287         char    s_type;         /* Symbol subtype */
288         char    s_flag;         /* Flag byte */
289         Addr_T  s_addr;         /* Address */
290         char    *s_id;          /* Name: JLH change from [NCPS] */
291 };
292
293 /*
294  *      The structure lfile contains a pointer to a
295  *      file specification string, the file type, and
296  *      a link to the next lfile structure.
297  */
298 struct  lfile
299 {
300         struct  lfile   *f_flp; /* lfile link */
301         int     f_type;         /* File type */
302         char    *f_idp;         /* Pointer to file spec */
303 };
304
305 /*
306  *      The struct base contains a pointer to a
307  *      base definition string and a link to the next
308  *      base structure.
309  */
310 struct  base
311 {
312         struct  base  *b_base;  /* Base link */
313         char          *b_strp;  /* String pointer */
314 };
315
316 /*
317  *      The struct globl contains a pointer to a
318  *      global definition string and a link to the next
319  *      global structure.
320  */
321 struct  globl
322 {
323         struct  globl *g_globl; /* Global link */
324         char          *g_strp;  /* String pointer */
325 };
326
327 /*
328  *      A structure sdp is created for each 'unique' paged
329  *      area definition found as the REL files are read.
330  *      As P directives are read from the REL files a linked
331  *      list of unique sdp structures is created by placing a
332  *      link to the new sdp structure in the previous area structure.
333  */
334 struct  sdp
335 {
336         struct  area  *s_area;  /* Paged Area link */
337         struct  areax *s_areax; /* Paged Area Extension Link */
338         Addr_T  s_addr;         /* Page address offset */
339 };
340
341 /*
342  *      The structure rerr is loaded with the information
343  *      required to report an error during the linking
344  *      process.  The structure contains an index value
345  *      which selects the areax structure from the header
346  *      areax structure list, a mode value which selects
347  *      symbol or area relocation, the base address in the
348  *      area section, an area/symbol list index value, and
349  *      an area/symbol offset value.
350  */
351 struct  rerr
352 {
353         int     aindex;         /* Linking area */
354         int     mode;           /* Relocation mode */
355         Addr_T  rtbase;         /* Base address in section */
356         int     rindex;         /* Area/Symbol reloaction index */
357         Addr_T  rval;           /* Area/Symbol offset value */
358 };
359
360 /*
361  *      The structure lbpath is created for each library
362  *      path specification input by the -k option.  The
363  *      lbpath structures are linked into a list using
364  *      the next link element.
365  */
366 struct lbpath {
367         struct  lbpath  *next;
368         char            *path;
369 };
370
371 /*
372  *      The structure lbname is created for all combinations of the
373  *      library path specifications (input by the -k option) and the
374  *      library file specifications (input by the -l option) that
375  *      lead to an existing file.  The element path points to
376  *      the path string, element libfil points to the library
377  *      file string, and the element libspc is the concatenation
378  *      of the valid path and libfil strings.
379  *
380  *      The lbpath structures are linked into a list
381  *      using the next link element.
382  *
383  *      Each library file contains a list of object files
384  *      that are contained in the particular library. e.g.:
385  *
386  *              \iolib\termio
387  *              \inilib\termio
388  *
389  *      Only one specification per line is allowed.
390  */
391 struct lbname {
392         struct  lbname  *next;
393         char            *path;
394         char            *libfil;
395         char            *libspc;
396 };
397
398 /*
399  *      The function fndsym() searches through all combinations of the
400  *      library path specifications (input by the -k option) and the
401  *      library file specifications (input by the -l option) that
402  *      lead to an existing file for a symbol definition.
403  *
404  *      The structure lbfile is created for the first library
405  *      object file which contains the definition for the
406  *      specified undefined symbol.
407  *
408  *      The element libspc points to the library file path specification
409  *      and element relfil points to the object file specification string.
410  *      The element filspc is the complete path/file specification for
411  *      the library file to be imported into the linker.  The
412  *      file specicifation may be formed in one of two ways:
413  *
414  *      (1)     If the library file contained an absolute
415  *              path/file specification then this becomes filspc.
416  *              (i.e. C:\...)
417  *
418  *      (2)     If the library file contains a relative path/file
419  *              specification then the concatenation of the path
420  *              and this file specification becomes filspc.
421  *              (i.e. \...)
422  *
423  *      The lbpath structures are linked into a list
424  *      using the next link element.
425  */
426 struct lbfile {
427         struct  lbfile  *next;
428         char            *libspc;
429         char            *relfil;
430         char            *filspc;
431 };
432
433 /*
434  *      External Definitions for all Global Variables
435  */
436
437 extern  char    *_abs_;         /*      = { ".  .ABS." };
438                                  */
439 extern  int     lkerr;          /*      ASLink error flag
440                                  */
441 extern  char    *ip;            /*      pointer into the REL file
442                                  *      text line in ib[]
443                                  */
444 extern  char    ib[NINPUT];     /*      REL file text line
445                                  */
446 extern  char    *rp;            /*      pointer into the LST file
447                                  *      text line in rb[]
448                                  */
449 extern  char    rb[NINPUT];     /*      LST file text line being
450                                  *      address relocated
451                                  */
452 extern  char    ctype[];        /*      array of character types, one per
453                                  *      ASCII character
454                                  */
455
456 /*
457  *      Character Type Definitions
458  */
459 #define SPACE   0000
460 #define ETC     0000
461 #define LETTER  0001
462 #define DIGIT   0002
463 #define BINOP   0004
464 #define RAD2    0010
465 #define RAD8    0020
466 #define RAD10   0040
467 #define RAD16   0100
468 #define ILL     0200
469
470 #define DGT2    DIGIT|RAD16|RAD10|RAD8|RAD2
471 #define DGT8    DIGIT|RAD16|RAD10|RAD8
472 #define DGT10   DIGIT|RAD16|RAD10
473 #define LTR16   LETTER|RAD16
474
475 #if     CASE_SENSITIVE
476 #else
477 extern  char    ccase[];        /*      an array of characters which
478                                  *      perform the case translation function
479                                  */
480 #endif
481
482 extern  struct  lfile   *filep; /*      The pointers (lfile *) filep,
483                                  *      (lfile *) cfp, and (FILE *) sfp
484                                  *      are used in conjunction with
485                                  *      the routine getline() to read
486                                  *      asmlnk commands from
487                                  *      (1) the standard input or
488                                  *      (2) or a command file
489                                  *      and to read the REL files
490                                  *      sequentially as defined by the
491                                  *      asmlnk input commands.
492                                  *
493                                  *      The pointer *filep points to the
494                                  *      beginning of a linked list of
495                                  *      lfile structures.
496                                  */
497 extern  struct  lfile   *cfp;   /*      The pointer *cfp points to the
498                                  *      current lfile structure
499                                  */
500 extern  struct  lfile   *startp;/*      asmlnk startup file structure
501                                  */
502 extern  struct  lfile   *linkp; /*      pointer to first lfile structure
503                                  *      containing an input REL file
504                                  *      specification
505                                  */
506 extern  struct  lfile   *lfp;   /*      pointer to current lfile structure
507                                  *      being processed by parse()
508                                  */
509 extern  struct  head    *headp; /*      The pointer to the first
510                                  *      head structure of a linked list
511                                  */
512 extern  struct  head    *hp;    /*      Pointer to the current
513                                  *      head structure
514                                  */
515 extern  struct  area    *areap; /*      The pointer to the first
516                                  *      area structure of a linked list
517                                  */
518 extern  struct  area    *ap;    /*      Pointer to the current
519                                  *      area structure
520                                  */
521 extern  struct  areax   *axp;   /*      Pointer to the current
522                                  *      areax structure
523                                  */
524 extern  struct  sym *symhash[NHASH]; /* array of pointers to NHASH
525                                       * linked symbol lists
526                                       */
527 extern  struct  base    *basep; /*      The pointer to the first
528                                  *      base structure
529                                  */
530 extern  struct  base    *bsp;   /*      Pointer to the current
531                                  *      base structure
532                                  */
533 extern  struct  globl   *globlp;/*      The pointer to the first
534                                  *      globl structure
535                                  */
536 extern  struct  globl   *gsp;   /*      Pointer to the current
537                                  *      globl structure
538                                  */
539 extern  struct  sdp     sdp;    /*      Base Paged structure
540                                  */
541 extern  struct  rerr    rerr;   /*      Structure containing the
542                                  *      linker error information
543                                  */
544 extern  FILE    *ofp;           /*      Linker Output file handle
545                                  */
546 extern  FILE    *mfp;           /*      Map output file handle
547                                  */
548 extern  FILE    *jfp;           /*      NoICE output file handle
549                                  */
550 extern  FILE    *rfp;           /*      File handle for output
551                                  *      address relocated ASxxxx
552                                  *      listing file
553                                  */
554 extern  FILE    *sfp;           /*      The file handle sfp points to the
555                                  *      currently open file
556                                  */
557 extern  FILE    *tfp;           /*      File handle for input
558                                  *      ASxxxx listing file
559                                  */
560 extern  FILE    *dfp;           /*      File handle for debug info output
561                                  */
562 extern  int     dflag;          /*      Output debug information flag
563                                  */
564 extern  int     oflag;          /*      Output file type flag
565                                  */
566 extern  int     mflag;          /*      Map output flag
567                                  */
568 extern  int     sflag;          /*      JCF: Memory usage output flag
569                                  */
570 extern  int     jflag;          /*      NoICE output flag
571                                  */
572 extern  int     xflag;          /*      Map file radix type flag
573                                  */
574 extern  int     pflag;          /*      print linker command file flag
575                                  */
576 extern  int     uflag;          /*      Listing relocation flag
577                                  */
578 extern int      rflag;          /*      Extended linear address record flag.
579                                 */                               
580 extern  int     radix;          /*      current number conversion radix:
581                                  *      2 (binary), 8 (octal), 10 (decimal),
582                                  *      16 (hexadecimal)
583                                  */
584 extern  int     line;           /*      current line number
585                                  */
586 extern  int     page;           /*      current page number
587                                  */
588 extern  int     lop;            /*      current line number on page
589                                  */
590 extern  int     pass;           /*      linker pass number
591                                  */
592 extern  int     rtcnt;          /*      count of elements in the
593                                  *      rtval[] and rtflg[] arrays
594                                  */
595 extern  Addr_T  rtval[];        /*      data associated with relocation
596                                  */
597 extern  int     rtflg[];        /*      indicates if rtval[] value is
598                                  *      to be sent to the output file.
599                                  *      (always set in this linker)
600                                  */
601 extern  int     hilo;           /*      REL file byte ordering
602                                  */
603 extern  int     gline;          /*      LST file relocation active
604                                  *      for current line
605                                  */
606 extern  int     gcntr;          /*      LST file relocation active
607                                  *      counter
608                                  */
609 extern  struct lbpath *lbphead; /*      pointer to the first
610                                  *      library path structure
611                                  */
612 extern  struct lbname *lbnhead; /*      pointer to the first
613                                  *      library name structure
614                                  */
615 extern  struct lbfile *lbfhead; /*      pointer to the first
616                                  *      library file structure
617                                  */
618 extern  Addr_T iram_size;       /*      internal ram size
619                                  */
620
621
622 /* C Library function definitions */
623 /* for reference only
624 extern  VOID            exit();
625 extern  int             fclose();
626 extern  char *          fgets();
627 extern  FILE *          fopen();
628 extern  int             fprintf();
629 extern  VOID            free();
630 extern  VOID *          malloc();
631 extern  char            putc();
632 extern  char *          strcpy();
633 extern  int             strlen();
634 extern  char *          strncpy();
635 */
636
637 /* Program function definitions */
638
639 /* lkmain.c */
640 extern  FILE *          afile();
641 extern  VOID            bassav();
642 extern  VOID            gblsav();
643 extern  VOID            iramsav();
644 extern  VOID            iramcheck();
645 extern  VOID            link_main();
646 extern  VOID            lkexit();
647 extern  int             main();
648 extern  VOID            map();
649 extern  int             parse();
650 extern  VOID            setbas();
651 extern  VOID            setgbl();
652 extern  VOID            usage();
653 extern  VOID            copyfile();
654
655 /* lklex.c */
656 extern  char            endline();
657 extern  char            get();
658 extern  VOID            getfid();
659 extern  VOID            getid();
660 extern  VOID            getSid();
661 extern  int             getline();
662 extern  int             getmap();
663 extern  char            getnb();
664 extern  int             more();
665 extern  VOID            skip();
666 extern  VOID            unget();
667 extern  VOID            chop_crlf();
668
669 /* lkarea.c */
670 extern  VOID            lkparea();
671 extern  VOID            lnkarea();
672 extern  VOID            lnksect();
673 extern  VOID            newarea();
674
675 /* lkhead.c */
676 extern  VOID            module();
677 extern  VOID            newhead();
678
679 /* lksym.c */
680 extern  int             hash();
681 extern  struct  sym *   lkpsym();
682 extern  VOID *          new();
683 extern  struct  sym *   newsym();
684 extern  VOID            symdef();
685 extern  int             symeq();
686 extern  VOID            syminit();
687 extern  VOID            symmod();
688 extern  Addr_T          symval();
689
690 /* lkeval.c */
691 extern  int             digit();
692 extern  Addr_T          eval();
693 extern  Addr_T          expr();
694 extern  int             oprio();
695 extern  Addr_T          term();
696
697 /* lklist.c */
698 extern  int             dgt();
699 extern  VOID            lkulist();
700 extern  VOID            lkalist();
701 extern  VOID            lkglist();
702 extern  VOID            lstarea();
703 extern  VOID            newpag();
704 extern  VOID            slew();
705
706 /* lkrloc.c */
707 extern  Addr_T          adb_b();
708 extern  Addr_T          adb_hi();
709 extern  Addr_T          adb_lo();
710 extern  Addr_T          adb_24_hi(Addr_T v, int i);
711 extern  Addr_T          adb_24_mid(Addr_T v, int i);
712 extern  Addr_T          adb_24_lo(Addr_T v, int i);
713 extern  Addr_T          adw_w();
714 extern  Addr_T          adw_24(Addr_T, int);
715 extern  Addr_T          adw_hi();
716 extern  Addr_T          adw_lo();
717 extern  Addr_T          evword();
718 extern  VOID            rele();
719 extern  VOID            reloc();
720 extern  VOID            relt();
721 extern  VOID            relr();
722 extern  VOID            relp();
723 extern  VOID            relerr();
724 extern  char *          errmsg[];
725 extern  VOID            errdmp();
726 extern  VOID            relerp();
727 extern  VOID            erpdmp();
728 extern  VOID            prntval();
729 extern  int             lastExtendedAddress;
730
731 /* lklibr.c */
732 extern  VOID            addfile();
733 extern  VOID            addlib();
734 extern  VOID            addpath();
735 extern  int             fndsym();
736 extern  VOID            library();
737 extern  VOID            loadfile();
738 extern  VOID            search();
739
740 /* lks19.c */
741 extern  VOID            s19();
742
743 /* lkihx.c */
744 extern  VOID            ihx();
745 extern  VOID            ihxEntendedLinearAddress(Addr_T);
746 /* lkstore.c */
747 extern char             *StoreString( char *str );
748
749 /* lknoice.c */
750 extern void             DefineNoICE( char *name, Addr_T value, int page );
751
752 /* JCF: lksmry.c */
753 extern int summary(struct area * xp);
754
755 /* SD added this to change
756         strcmpi --> strcmp (strcmpi NOT ANSI) */
757 #define strcmpi strcmp
758