* as/asranlib/asranlib.c: retain the original file mode
[fw/sdcc] / as / link / aslink.h
index 15796382e27344173f5cb6025802fb96109932e1..ff45b4661cae2d4e02931a3d833b874da2377a6f 100644 (file)
@@ -1,14 +1,22 @@
-/* aslink.h */
+/* aslink.h
 
-/*
- * (C) Copyright 1989-1996
- * All Rights Reserved
- *
- * Alan R. Baldwin
- * 721 Berkeley St.
- * Kent, Ohio  44240
- *
- * 28-Oct-97 JLH:
+   Copyright (C) 1989-1995 Alan R. Baldwin
+   721 Berkeley St., Kent, Ohio 44240
+
+This program is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3, or (at your option) any
+later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>. */
+
+/* 28-Oct-97 JLH:
  *           - add proto for StoreString
  *           - change s_id from [NCPS] to pointer
  *           - change NCPS to 80
         $(STACK) = 2000
 */
 
+#if defined  decus
 /* DECUS C void definition */
 /* File/extension seperator */
 
-#ifdef  decus
-#define VOID    char
-#define FSEPX   '.'
-#endif
+#define VOID        char
+#define FSEPX       '.'
 
+#elif defined  PDOS
 /* PDOS C void definition */
 /* File/extension seperator */
 
-#ifdef  PDOS
-#define VOID    char
-#define FSEPX   ':'
-#endif
+#define VOID        char
+#define FSEPX       ':'
 
-/* Default void definition */
+#elif defined UNIX
+/* UNIX void definition */
 /* File/extension seperator */
 
-#ifndef VOID
-#define VOID    void
-#define FSEPX   '.'
+#define VOID        void
+#define FSEPX       '.'
+#define LKDIRSEP    '/'
+#define LKDIRSEPSTR "/"
 #define OTHERSYSTEM
+
+#else
+/* DOS/WINDOWS void definition */
+/* File/extension seperator */
+
+#define VOID        void
+#define FSEPX       '.'
+#define LKDIRSEP    '\\'
+#define LKDIRSEPSTR "\\"
+#define OTHERSYSTEM
+
 #endif
 
 /*
  #endif
 #endif
 
+#ifdef SDK
+    #define LKOBJEXT "o"
+#else /* SDK */
+    #define LKOBJEXT "rel"
+#endif /* SDK */
+
 /*
  * This file defines the format of the
  * relocatable binary file.
 /*
  * File types
  */
-#define F_INV  0               /* invalid */
+#define F_INV   0               /* invalid */
 #define F_STD   1               /* stdin */
 #define F_LNK   2               /* File.lnk */
 #define F_REL   3               /* File.rel */
-#define        F_CMD   4               /* Command line */
+#define F_CMD   4               /* Command line */
 
 #ifdef GAMEBOY
 /*
@@ -278,8 +303,10 @@ struct  area
         Addr_T  a_size;         /* Total size of the area */
         Addr_T  a_unaloc;       /* Total number of unallocated bytes, for error reporting */
         char    a_type;         /* Area subtype */
-        char    a_flag;         /* Flag byte */
+        int     a_flag;         /* Flag byte */
         char    a_id[NCPS];     /* Name */
+        char    *a_image;       /* Something for hc08/lkelf */
+        char    *a_used;        /* Something for hc08/lkelf */
 };
 
 /*
@@ -466,7 +493,8 @@ struct lbfile {
         char            *libspc;
         char            *relfil;
         char            *filspc;
-        long            offset; /*>=0 if rel file is embedded in a lib file at this offset*/
+        long            offset;
+        unsigned int    type;
 };
 
 /*
@@ -616,8 +644,8 @@ extern  int     stacksize;      /*      Pack data memory flag
                                  */
 extern  int     jflag;          /*      NoICE output flag
                                  */
-extern int     symflag;        /*      no$gmb .sym output flag
-                                */
+extern  int     symflag;        /*      no$gmb .sym output flag
+                                 */
 extern  int     xflag;          /*      Map file radix type flag
                                  */
 extern  int     pflag;          /*      print linker command file flag
@@ -701,7 +729,7 @@ extern  VOID            link_main();
 extern  VOID            lkexit();
 extern  int             main();
 extern  VOID            map();
-extern VOID            sym();
+extern  VOID            sym();
 extern  int             parse();
 extern  VOID            setbas();
 extern  VOID            setgbl();
@@ -800,8 +828,8 @@ extern  VOID            s19();
 
 /* lkihx.c */
 extern  VOID            ihx();
-extern  VOID            ihxEntendedLinearAddress(Addr_T);
-extern  VOID            newArea();
+extern  VOID            ihxExtendedLinearAddress(Addr_T);
+extern  VOID            ihxNewArea();
 
 /* lkstore.c */
 extern  char *          StoreString( char *str );