+2009-01-08 Borut Razem <borut.razem AT siol.net>
+
+ * as/asranlib/Makefile.in, as/asranlib/asranlib.dsp,
+ as/asranlib/asranlib.c: added asranlib
+ * as/link/lkar.c, as/link/lkar.h: added support for ar format libraries
+ * Makefile.in, as/link/hc08/Makefile.in,
+ as/link/hc08/link_hc08.dsp, as/link/lklib.c, as/link/lklibr.c,
+ as/link/lklibr.h, as/link/lkrel.c, as/link/lkrel.h,
+ as/link/lksdcclib.c, as/link/mcs51/Makefile.in,
+ as/link/mcs51/aslink.dsp, as/link/z80/Makefile.in,
+ as/link/z80/linkgbz80.dsp, as/link/z80/linkz80.dsp, configure,
+ configure.in, sdcc.dsw: modified to support ar format libraries
+
2009-01-08 Maarten Brock <sourceforge.brock AT dse.nl>
* src/SDCCast.c (decorateType RETURN): use RESULT_TYPE_GPTR for generic
2009-01-05 Philipp Klaus Krause <pkk AT spth.de>
* sim/ucsim/z80.src/inst_ed.cc:
- Fixed bug #2488074, which made regression tests fail.
+ Fixed bug #2488074, which made regression tests fail.
2009-01-05 Philipp Klaus Krause <pkk AT spth.de>
#
#
-SHELL = /bin/sh
+SHELL = /bin/sh
VPATH = @srcdir@
srcdir = @srcdir@
include Makefile.common
-SDCC_LIBS = support/makebin
+SDCC_LIBS = support/makebin
SDCC_DOC = doc
# Parts that are not normally compiled but need to be cleaned
SDCC_EXTRA = support/regression support/valdiag
-SDCC_PACKIHX = support/packihx
-SDCC_LIBRARIAN = support/librarian
+SDCC_PACKIHX = support/packihx
+SDCC_LIBRARIAN = support/librarian
+SDCC_ASRANLIB = as/asranlib
+
+TARGETS = sdcc-librarian sdcc-asranlib
ifeq ($(OPT_DISABLE_HC08), 0)
SDCC_ASLINK += as/hc08 as/link/hc08
ifeq ($(OPT_DISABLE_MCS51), 0)
SDCC_ASLINK += as/mcs51 as/link/mcs51
-SDCC_MISC += debugger/mcs51
+SDCC_MISC += debugger/mcs51
endif
ifeq ($(OPT_DISABLE_Z80), 0)
SDCC_LIBS += support/cpp
endif
-TARGETS += sdcc-libs sdcc-cc sdcc-device-inc sdcc-aslink sdcc-librarian
+TARGETS += sdcc-libs sdcc-cc sdcc-device-inc sdcc-aslink
-PKGS += $(SDCC_LIBS) src device/include $(SDCC_ASLINK) $(SDCC_LIBRARIAN)
+PKGS += $(SDCC_LIBS) src device/include $(SDCC_ASLINK) $(SDCC_LIBRARIAN)
-PKGS_TINI = $(SDCC_LIBS) $(SDCC_ASLINK) \
- src device/include $(SDCC_PACKIHX) $(SDCC_LIBRARIAN)
-PORTS = $(shell cat ports.build)
-ALLPORTS = $(shell cat ports.all)
+PKGS_TINI = $(SDCC_LIBS) $(SDCC_ASLINK) \
+ src device/include $(SDCC_PACKIHX) $(SDCC_LIBRARIAN)
+PORTS = $(shell cat ports.build)
+ALLPORTS = $(shell cat ports.all)
# Compiling entire program or any subproject
# ------------------------------------------
sdcc-librarian:
$(MAKE) -C $(SDCC_LIBRARIAN)
+sdcc-asranlib:
+ $(MAKE) -C $(SDCC_ASRANLIB)
+
sdcc-device-inc:
$(MAKE) -C device/include
sdcc-device-lib: sdcc-cc sdcc-aslink
- $(MAKE) -C device/lib
+ $(MAKE) -C device/lib LIB_TYPE=SDCCLIB
sdcc-device-tini:
$(MAKE) -C device/include
sdcc: $(TARGETS)
-sdcc-tini: sdcc-cc sdcc-aslink sdcc-device-tini sdcc-packihx sdcc-librarian
+sdcc-tini: sdcc-librarian sdcc-asranlib sdcc-cc sdcc-aslink sdcc-device-tini sdcc-packihx
$(MAKE) -f main.mk all
# Some interesting sub rules
--- /dev/null
+VPATH = @srcdir@
+srcdir = @srcdir@
+top_builddir = @top_builddir@
+
+include $(top_builddir)/Makefile.common
+
+CFLAGS += -Wall -I$(srcdir)/../link
+
+OBJECTS = asranlib.o
+
+SOURCES = $(patsubst %.o,%.c,$(OBJECTS))
+
+TARGET = $(top_builddir)/bin/asranlib$(EXEEXT)
+
+all: $(TARGET)
+
+install: all installdirs
+ $(INSTALL) $(TARGET) `echo $(DESTDIR)$(bindir)/asranlib$(EXEEXT)|sed '$(transform)'`
+ $(STRIP) `echo $(DESTDIR)$(bindir)/asranlib$(EXEEXT)|sed '$(transform)'`
+
+# Deleting all the installed files
+# --------------------------------
+uninstall:
+ rm -f $(DESTDIR)$(bindir)/asranlib$(EXEEXT)
+
+# Performing self-test
+# --------------------
+check:
+
+
+# Performing installation test
+# ----------------------------
+installcheck:
+
+
+# Creating installation directories
+# ---------------------------------
+installdirs:
+ $(INSTALL) -d $(DESTDIR)$(bindir)
+
+
+# Creating dependencies
+# ---------------------
+dep:
+
+$(TARGET): $(OBJECTS) dbuf.o dbuf_string.o
+ $(CC) $(LDFLAGS) -o $@ $(OBJECTS) dbuf.o dbuf_string.o
+
+dbuf.o: $(srcdir)/../../support/Util/dbuf.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
+
+dbuf_string.o: $(srcdir)/../../support/Util/dbuf_string.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
+
+.c.o:
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
+
+
+checkconf:
+
+clean:
+ rm -f *core *[%~] *.[oa] *.output
+ rm -f .[a-z]*~ \#*
+ rm -f $(top_builddir)/bin/asranlib$(EXEEXT)
+
+distclean realclean: clean
+ rm -f Makefile
--- /dev/null
+/* asranlib.c - ranlib for asxxxx arvhives
+ version 1.0.0, April 27th, 2008
+
+ Copyright (C) 2008-2009 Borut Razem, borut dot razem at siol dot net
+
+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 2, 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, write to the Free Software
+Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <time.h>
+#include "dbuf_string.h"
+#include "lkar.h"
+
+#ifdef _WIN32
+#include <io.h>
+#define mktemp _mktemp
+#endif
+
+#define NELEM(x) (sizeof (x) / sizeof (*x))
+
+
+int
+is_ar (FILE * libfp)
+{
+ char buf[SARMAG];
+ int ret;
+
+ if (!(ret = fread (buf, 1, sizeof (buf), libfp) == sizeof (buf) && memcmp (buf, ARMAG, SARMAG) == 0))
+ rewind (libfp);
+
+ return ret;
+}
+
+static struct ar_hdr *
+ar_get_header (struct ar_hdr *hdr, FILE * libfp)
+{
+ char header[ARHDR_LEN];
+ char buf[AR_DATE_LEN + 1];
+
+ if (fread (header, 1, sizeof (header), libfp) != sizeof (header) ||
+ memcmp (header + AR_FMAG_OFFSET, ARFMAG, AR_FMAG_LEN) != 0)
+ {
+ /* not an ar archive */
+ return NULL;
+ }
+
+ memcpy (hdr->ar_name, &header[AR_NAME_OFFSET], AR_NAME_LEN);
+ hdr->ar_name[AR_NAME_LEN] = '\0';
+
+ memcpy (buf, &header[AR_DATE_OFFSET], AR_DATE_LEN);
+ buf[AR_DATE_LEN] = '\0';
+ hdr->ar_date = strtol (buf, NULL, 0);
+
+ memcpy (buf, &header[AR_UID_OFFSET], AR_GID_LEN);
+ buf[AR_GID_LEN] = '\0';
+ hdr->ar_uid = (uid_t) strtol (buf, NULL, 0);
+
+ memcpy (buf, &header[AR_GID_OFFSET], AR_DATE_LEN);
+ buf[AR_DATE_LEN] = '\0';
+ hdr->ar_gid = (gid_t) strtol (buf, NULL, 0);
+
+ memcpy (buf, &header[AR_MODE_OFFSET], AR_MODE_LEN);
+ buf[AR_MODE_LEN] = '\0';
+ hdr->ar_mode = (mode_t) strtoul (buf, NULL, 0);
+
+ memcpy (buf, &header[AR_SIZE_OFFSET], AR_SIZE_LEN);
+ buf[AR_SIZE_LEN] = '\0';
+ hdr->ar_size = strtol (buf, NULL, 0);
+
+ return hdr;
+}
+
+
+struct symbol_s
+ {
+ const char *name;
+ off_t offset;
+ struct symbol_s *next;
+ };
+
+struct symbol_s *symlist, *lastsym;
+off_t offset, first_member_offset;
+
+int
+add_symbol (const char *sym, void *param)
+{
+ struct symbol_s *s;
+
+ if ((s = (struct symbol_s *) malloc (sizeof (struct symbol_s))) == NULL)
+ return 0;
+
+ s->name = strdup (sym);
+ s->offset = offset - first_member_offset;
+ s->next = NULL;
+
+ if (NULL == symlist)
+ {
+ lastsym = symlist = s;
+ }
+ else
+ {
+ lastsym->next = s;
+ lastsym = s;
+ }
+
+ return 0;
+}
+
+
+int
+is_rel (FILE * libfp)
+{
+ int c;
+ long pos = ftell (libfp);
+ int ret = 0;
+
+ /* [XDQ][HL] */
+ if (((c = getc (libfp)) == 'X' || c == 'D' || c == 'Q') && ((c = getc (libfp)) == 'H' || c == 'L'))
+ {
+ switch (getc (libfp))
+ {
+ case '\r':
+ if (getc (libfp) == '\n')
+ ret = 1;
+ break;
+
+ case '\n':
+ ret = 1;
+ }
+ }
+ else if (c == ';')
+ {
+ char buf[6];
+
+ if (fread (buf, 1, sizeof (buf), libfp) == sizeof (buf) && memcmp (buf, "!FILE ", 6) == 0)
+ ret = 1;
+ }
+ fseek (libfp, pos, SEEK_SET);
+ return ret;
+}
+
+int
+enum_symbols (FILE * fp, long size, int (*func) (const char *sym, void *param), void *param)
+{
+ long end;
+ struct dbuf_s buf;
+ struct dbuf_s symname;
+
+ assert (func != NULL);
+
+ dbuf_init (&buf, 512);
+ dbuf_init (&symname, 32);
+
+ end = (size >= 0) ? ftell (fp) + size : -1;
+
+ /*
+ * Read in the object file. Look for lines that
+ * begin with "S" and end with "D". These are
+ * symbol table definitions. If we find one, see
+ * if it is our symbol. Make sure we only read in
+ * our object file and don't go into the next one.
+ */
+
+ while (end < 0 || ftell (fp) < end)
+ {
+ const char *p;
+
+ dbuf_set_length (&buf, 0);
+ if (dbuf_getline (&buf, fp) == 0)
+ break;
+
+ p = dbuf_c_str (&buf);
+
+ if ('T' == p[0])
+ break;
+
+ /*
+ * Skip everything that's not a symbol record.
+ */
+ if ('S' == p[0] && ' ' == p[1])
+ {
+ dbuf_set_length (&symname, 0);
+
+ for (p += 2; *p && ' ' != *p; ++p)
+ dbuf_append_char (&symname, *p);
+
+ /* If it's an actual symbol, record it */
+ if (' ' == p[0] && 'D' == p[1])
+ if (func != NULL)
+ if ((*func) (dbuf_c_str (&symname), NULL))
+ return 1;
+ }
+ }
+
+ dbuf_destroy (&buf);
+ dbuf_destroy (&symname);
+
+ return 0;
+}
+
+int
+get_symbols (FILE * fp, const char *archive)
+{
+ struct ar_hdr hdr;
+
+ if (!is_ar (fp) || !ar_get_header (&hdr, fp))
+ {
+ fprintf (stderr, "asranlib: %s: File format not recognized\n", archive);
+ exit (1);
+ }
+
+ if (AR_IS_SYMBOL_TABLE (hdr))
+ {
+ /* skip the symbol table */
+ fseek (fp, hdr.ar_size + (hdr.ar_size & 1), SEEK_CUR);
+ }
+
+ first_member_offset = ftell (fp) - ARHDR_LEN;
+
+ /* walk trough all archive members */
+ do
+ {
+ if (is_rel (fp))
+ {
+ long mdule_offset = ftell (fp);
+
+ offset = mdule_offset - ARHDR_LEN;
+
+ enum_symbols (fp, hdr.ar_size, add_symbol, NULL);
+
+ fseek (fp, mdule_offset + hdr.ar_size, SEEK_SET);
+
+ if (hdr.ar_size & 1)
+ {
+ int c = getc (fp);
+ assert (c == EOF || c == '\n');
+ }
+ }
+ else
+ {
+ /* skip if the member is not a .REL format */
+ fseek (fp, hdr.ar_size + (hdr.ar_size & 1), SEEK_CUR);
+ }
+ }
+ while (ar_get_header (&hdr, fp));
+
+ return 1;
+}
+
+
+void
+do_ranlib (const char *archive)
+{
+ FILE *infp;
+
+ if (NULL == (infp = fopen (archive, "rb")))
+ {
+ fprintf (stderr, "asranlib: %s: ", archive);
+ perror (NULL);
+ exit (1);
+ }
+
+ if (get_symbols (infp, archive))
+ {
+ FILE *outfp = NULL;
+ struct symbol_s *symp;
+ char buf[4];
+ int str_length = 0;
+ int pad = 0;
+ int nsym;
+ int symtab_size;
+ char tmpfile[] = "arXXXXXX";
+
+ if (NULL == mktemp (tmpfile) || NULL == (outfp = fopen (tmpfile, "wb")))
+ {
+ fclose (infp);
+ fprintf (stderr, "asranlib: %s: ", tmpfile);
+ perror (NULL);
+ exit (1);
+ }
+
+ /* calculate the size of symbol table */
+ for (nsym = 0, symp = symlist; symp; ++nsym, symp = symp->next)
+ {
+ str_length += strlen (symp->name) + 1;
+ }
+
+ symtab_size = 4 + 4 * nsym + str_length;
+
+ fprintf (outfp, ARMAG AR_SYMBOL_TABLE_NAME "%-12d%-6d%-6d%-8d%-10d" ARFMAG, (int) time (NULL), 0, 0, 0, symtab_size);
+
+ if (symtab_size & 1)
+ {
+ pad = 1;
+ ++symtab_size;
+ }
+ else
+ pad = 0;
+
+ symtab_size += SARMAG + ARHDR_LEN;
+
+ sputl (nsym, buf);
+ fwrite (buf, 1, sizeof (buf), outfp);
+
+ for (symp = symlist; symp; symp = symp->next)
+ {
+ sputl (symp->offset + symtab_size, buf);
+ fwrite (buf, 1, sizeof (buf), outfp);
+ }
+
+
+ for (symp = symlist; symp; symp = symp->next)
+ {
+ fputs (symp->name, outfp);
+ putc ('\0', outfp);
+ }
+
+ if (pad)
+ putc ('\n', outfp);
+
+ fseek (infp, first_member_offset, SEEK_SET);
+
+ while (EOF != (pad = getc (infp)))
+ putc (pad, outfp);
+
+ fclose (outfp);
+ fclose (infp);
+
+ if (0 != remove (archive))
+ {
+ fprintf (stderr, "asranlib: can't remove %s to %s: ", tmpfile, archive);
+ perror (NULL);
+ }
+ else if (0 != rename (tmpfile, archive))
+ {
+ fprintf (stderr, "asranlib: can't rename %s to %s: ", tmpfile, archive);
+ perror (NULL);
+ }
+ }
+ else
+ fclose (infp);
+}
+
+
+void
+print_version (void)
+{
+ printf ("SDCC asxxxx ranlib 1.0.0 $Revision$\n");
+ exit (0);
+}
+
+
+void
+usage (void)
+{
+ printf ("Usage: asranlib [options] archive\n"
+ " Generate an index to speed access to archives\n"
+ " The options are:\n"
+ " -h --help Print this help message\n"
+ " -V --version Print version information\n"
+ "asranlib: supported targets: asxxxx\n");
+
+ exit (1);
+}
+
+
+struct opt_s
+ {
+ const char *opt;
+ void (*optfnc) (void);
+ }
+opts[] =
+ {
+ { "-v", &print_version, },
+ { "-V", &print_version, },
+ { "--version", &print_version, },
+ { "-h", &usage, },
+ { "--help", &usage, },
+ };
+
+
+void
+process_options (int argc, char *argv[])
+{
+ char **argp;
+ int noopts = 0;
+ int narch = 0;
+ for (argp = argv + 1; *argp; ++argp)
+ {
+ if (!noopts && (*argp)[0] == '-')
+ {
+ int i;
+
+ if ((*argp)[1] == '-' && (*argp)[2] == '\0')
+ {
+ noopts = 1;
+ continue;
+ }
+
+ for (i = 0; i < NELEM (opts); ++i)
+ {
+ if (0 == strcmp (*argp, opts[i].opt))
+ {
+ if (NULL != opts[i].optfnc)
+ {
+ (*opts[i].optfnc) ();
+ continue;
+ }
+ }
+ }
+ }
+
+ do_ranlib (*argp);
+ ++narch;
+ }
+
+ if (!narch)
+ usage ();
+}
+
+
+int
+main (int argc, char *argv[])
+{
+ process_options (argc, argv);
+
+ return 0;
+}
--- /dev/null
+# Microsoft Developer Studio Project File - Name="asranlib" - Package Owner=<4>\r
+# Microsoft Developer Studio Generated Build File, Format Version 6.00\r
+# ** DO NOT EDIT **\r
+\r
+# TARGTYPE "Win32 (x86) Console Application" 0x0103\r
+\r
+CFG=asranlib - Win32 Debug\r
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
+!MESSAGE use the Export Makefile command and run\r
+!MESSAGE \r
+!MESSAGE NMAKE /f "asranlib.mak".\r
+!MESSAGE \r
+!MESSAGE You can specify a configuration when running NMAKE\r
+!MESSAGE by defining the macro CFG on the command line. For example:\r
+!MESSAGE \r
+!MESSAGE NMAKE /f "asranlib.mak" CFG="asranlib - Win32 Debug"\r
+!MESSAGE \r
+!MESSAGE Possible choices for configuration are:\r
+!MESSAGE \r
+!MESSAGE "asranlib - Win32 Release" (based on "Win32 (x86) Console Application")\r
+!MESSAGE "asranlib - Win32 Debug" (based on "Win32 (x86) Console Application")\r
+!MESSAGE \r
+\r
+# Begin Project\r
+# PROP AllowPerConfigDependencies 0\r
+# PROP Scc_ProjName ""\r
+# PROP Scc_LocalPath ""\r
+CPP=cl.exe\r
+RSC=rc.exe\r
+\r
+!IF "$(CFG)" == "asranlib - Win32 Release"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 0\r
+# PROP BASE Output_Dir "Release"\r
+# PROP BASE Intermediate_Dir "Release"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 0\r
+# PROP Output_Dir "Release"\r
+# PROP Intermediate_Dir "Release"\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c\r
+# ADD CPP /nologo /W3 /GX /O2 /I "../link" /I "../../support/Util" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c\r
+# ADD BASE RSC /l 0x424 /d "NDEBUG"\r
+# ADD RSC /l 0x424 /d "NDEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386\r
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386\r
+\r
+!ELSEIF "$(CFG)" == "asranlib - Win32 Debug"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "Debug"\r
+# PROP BASE Intermediate_Dir "Debug"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "Debug"\r
+# PROP Intermediate_Dir "Debug"\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c\r
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../link" /I "../../support/Util" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c\r
+# ADD BASE RSC /l 0x424 /d "_DEBUG"\r
+# ADD RSC /l 0x424 /d "_DEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
+\r
+!ENDIF \r
+\r
+# Begin Target\r
+\r
+# Name "asranlib - Win32 Release"\r
+# Name "asranlib - Win32 Debug"\r
+# Begin Group "Source Files"\r
+\r
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"\r
+# Begin Source File\r
+\r
+SOURCE=.\asranlib.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\support\Util\dbuf.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\support\Util\dbuf_string.c\r
+# End Source File\r
+# End Group\r
+# Begin Group "Header Files"\r
+\r
+# PROP Default_Filter "h;hpp;hxx;hm;inl"\r
+# Begin Source File\r
+\r
+SOURCE=..\link\aslink.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\link\asxxxx_config.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\support\Util\dbuf.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\..\support\Util\dbuf_string.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\link\lkar.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=..\link\lkrel.h\r
+# End Source File\r
+# End Group\r
+# Begin Group "Resource Files"\r
+\r
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"\r
+# End Group\r
+# End Target\r
+# End Project\r
ASXXLIBSRC = strcmpi.c
-LKLIBSRC = getline.c lkaomf51.c lkdata.c lkeval.c \
+LKLIBSRC = getline.c lkaomf51.c lkar.c lkdata.c lkeval.c \
lkhead.c lklex.c lklib.c lklibr.c lklist.c \
lknoice.c lkrel.c lksdcclib.c lkstore.c lksym.c
# End Source File\r
# Begin Source File\r
\r
+SOURCE=..\lkar.c\r
+# End Source File\r
+# Begin Source File\r
+\r
SOURCE=.\lkarea.c\r
# End Source File\r
# Begin Source File\r
# End Source File\r
# Begin Source File\r
\r
+SOURCE=..\lkar.h\r
+# End Source File\r
+# Begin Source File\r
+\r
SOURCE=..\lklibr.h\r
# End Source File\r
# Begin Source File\r
--- /dev/null
+/* lkar.c - ar library format handling
+
+ Copyright (C) 1989-1995 Alan R. Baldwin
+ 721 Berkeley St., Kent, Ohio 44240
+ Copyright (C) 2008-2009 Borut Razem, borut dot razem at siol dot net
+
+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 2, 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, write to the Free Software
+Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+/*
+ * With contributions for the
+ * object libraries from
+ * Ken Hornstein
+ * kenh@cmf.nrl.navy.mil
+ *
+ */
+
+/*
+ * Extensions: P. Felber
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
+#include "aslink.h"
+#include "lklibr.h"
+#include "lkrel.h"
+#include "lkar.h"
+
+
+#ifndef max
+# define max(a,b) ((a) > (b) ? (a) : (b))
+#endif
+
+#ifndef min
+# define min(a,b) ((a) < (b) ? (a) : (b))
+#endif
+
+
+static int
+is_ar (FILE * libfp)
+{
+ char buf[SARMAG];
+ int ret;
+
+ if (!(ret = fread (buf, 1, sizeof (buf), libfp) == sizeof (buf) && memcmp (buf, ARMAG, SARMAG) == 0))
+ rewind (libfp);
+
+ return ret;
+}
+
+static struct ar_hdr *
+ar_get_header (struct ar_hdr *hdr, FILE * libfp)
+{
+ char header[ARHDR_LEN];
+ char buf[AR_DATE_LEN + 1];
+
+ if (fread (header, 1, sizeof (header), libfp) != sizeof (header)
+ || memcmp (header + AR_FMAG_OFFSET, ARFMAG, AR_FMAG_LEN) != 0)
+ {
+ /* not an ar archive */
+ return NULL;
+ }
+
+ memcpy (hdr->ar_name, &header[AR_NAME_OFFSET], AR_NAME_LEN);
+ hdr->ar_name[AR_NAME_LEN] = '\0';
+
+ memcpy (buf, &header[AR_DATE_OFFSET], AR_DATE_LEN);
+ buf[AR_DATE_LEN] = '\0';
+ hdr->ar_date = strtol (buf, NULL, 0);
+
+ memcpy (buf, &header[AR_UID_OFFSET], AR_GID_LEN);
+ buf[AR_GID_LEN] = '\0';
+ hdr->ar_uid = (uid_t) strtol (buf, NULL, 0);
+
+ memcpy (buf, &header[AR_GID_OFFSET], AR_DATE_LEN);
+ buf[AR_DATE_LEN] = '\0';
+ hdr->ar_gid = (gid_t) strtol (buf, NULL, 0);
+
+ memcpy (buf, &header[AR_MODE_OFFSET], AR_MODE_LEN);
+ buf[AR_MODE_LEN] = '\0';
+ hdr->ar_mode = (mode_t) strtoul (buf, NULL, 0);
+
+ memcpy (buf, &header[AR_SIZE_OFFSET], AR_SIZE_LEN);
+ buf[AR_SIZE_LEN] = '\0';
+ hdr->ar_size = strtol (buf, NULL, 0);
+
+ return hdr;
+}
+
+static char *sym_tab;
+static int sym_tab_size;
+
+static void
+loadfile_ar (struct lbfile *lbfh)
+{
+ FILE *fp;
+
+#ifdef __CYGWIN__
+ char posix_path[PATH_MAX];
+ void cygwin_conv_to_full_posix_path (char *win_path, char *posix_path);
+ cygwin_conv_to_full_posix_path (lbfh->libspc, posix_path);
+ fp = fopen (posix_path, "rb");
+#else
+ fp = fopen (lbfh->libspc, "rb");
+#endif
+
+ if (fp != NULL)
+ {
+ struct ar_hdr hdr;
+
+ fseek (fp, lbfh->offset, SEEK_SET);
+ if (ar_get_header (&hdr, fp))
+ {
+ D ("Loading module %s from file %s.\n", hdr.ar_name, lbfh->libspc);
+ load_rel (fp, hdr.ar_size);
+ fclose (fp);
+ }
+ else
+ {
+ fprintf (stderr, "?ASlink-Error-Bad offset in library file %s(%s)\n", lbfh->libspc, lbfh->relfil);
+ fclose (fp);
+ lkexit (1);
+ }
+ }
+ else
+ {
+ fprintf (stderr, "?ASlink-Error-Opening library '%s'\n", lbfh->libspc);
+ lkexit (1);
+ }
+}
+
+#if INDEXLIB
+char *
+get_member_name (char *name)
+{
+ if (name[0] == '/')
+ {
+ if (NULL != sym_tab)
+ {
+ char *p;
+
+ int name_offset = strtol (++name, &p, 0);
+ if (p != name && name_offset < sym_tab_size)
+ {
+ int len = p - name + 1;
+ while (len < AR_NAME_LEN && name[len++] == ' ')
+ ;
+ if (len == AR_NAME_LEN)
+ {
+ char *n;
+
+ /* long name: get it from the symbol table */
+ name = &sym_tab[name_offset];
+ for (p = name; *p != '/' && *p != '\n'; ++p)
+ assert (p < &sym_tab[sym_tab_size]);
+
+ if (p[0] != '/' || p[1] != '\n')
+ while (*++p != '\n')
+ assert (p < &sym_tab[sym_tab_size]);
+
+ n = (char *) malloc (p - name + 1);
+ memcpy (n, name, p - name);
+ n[p - name] = '\0';
+ return n;
+ }
+ }
+ }
+ }
+ else
+ {
+ char *p = strrchr (name, '/');
+
+ if (NULL != p)
+ {
+ int len = p - name;
+ while (name[++len] == ' ')
+ ;
+ if (len == AR_NAME_LEN)
+ {
+ char *n = (char *) malloc (p - name + 1);
+ memcpy (n, name, p - name);
+ n[p - name] = '\0';
+ return n;
+ }
+ }
+ }
+
+ /* bad formed member name:
+ just return it */
+
+ return strdup (name);
+}
+
+static char *
+get_member_name_by_offset (FILE * fp, long offset)
+{
+ struct ar_hdr hdr;
+
+ fseek (fp, offset, SEEK_SET);
+
+ /* walk trough all archive members */
+ return (NULL != ar_get_header (&hdr, fp)) ? get_member_name (hdr.ar_name) : NULL;
+}
+
+static pmlibraryfile
+find_member_by_offset (const char *libspc, long offset)
+{
+ pmlibraryfile p;
+
+ for (p = libr; p; p = p->next)
+ {
+ if (0 == strcmp (libspc, p->libspc) && p->offset == offset)
+ return p;
+ }
+
+ return NULL;
+}
+
+static pmlibraryfile
+buildlibraryindex_ar (struct lbname *lbnh, FILE * libfp, pmlibraryfile This, int type)
+{
+ struct ar_hdr hdr;
+
+ /* walk trough all archive members */
+ while (ar_get_header (&hdr, libfp))
+ {
+ if (AR_IS_SYMBOL_TABLE (hdr))
+ {
+ char *buf, *po, *ps;
+ int i;
+ long nsym;
+
+ buf = (char *) new (hdr.ar_size);
+
+ if ((off_t) fread (buf, 1, hdr.ar_size, libfp) != hdr.ar_size)
+ {
+ free (buf);
+ return This;
+ }
+
+ nsym = sgetl (buf);
+
+ po = buf + 4;
+ ps = po + nsym * 4;
+
+ for (i = 0; i < nsym; ++i)
+ {
+ pmlibrarysymbol ThisSym;
+ char *sym;
+ long offset;
+ pmlibraryfile entry;
+
+ offset = sgetl (po);
+ po += 4;
+
+ sym = strdup (ps);
+ while (*ps++ != '\0')
+ ;
+
+ if ((entry = find_member_by_offset (lbnh->libspc, offset)) != NULL)
+ {
+ for (ThisSym = entry->symbols; ThisSym->next != NULL; ThisSym = ThisSym->next)
+ ;
+ }
+ else
+ {
+ /* Opened OK - create a new libraryfile object for it */
+ if (This == NULL)
+ {
+ assert (libr == NULL);
+ libr = This = (pmlibraryfile) new (sizeof (mlibraryfile));
+ }
+ else
+ {
+ This->next = (pmlibraryfile) new (sizeof (mlibraryfile));
+ This = This->next;
+ }
+ This->next = NULL;
+ This->loaded = -1;
+ This->libspc = lbnh->libspc;
+ This->offset = offset;
+ This->relfil = get_member_name_by_offset (libfp, offset); /* member name */
+ This->filspc = strdup (This->relfil); /* member file name */
+ This->type = type;
+
+ /* start a new linked list of symbols for this module. */
+ This->symbols = ThisSym = NULL;
+ }
+
+ if (ThisSym == NULL)
+ ThisSym = This->symbols = (pmlibrarysymbol) new (sizeof (mlibrarysymbol));
+ else
+ {
+ ThisSym->next = (pmlibrarysymbol) new (sizeof (mlibrarysymbol));
+ ThisSym = ThisSym->next;
+ }
+ This->loaded = 0;
+ ThisSym->next = NULL;
+ ThisSym->name = sym;
+ }
+ free (buf);
+
+ break;
+ }
+ else if (AR_IS_STRING_TABLE (hdr))
+ {
+ if (sym_tab)
+ free (sym_tab);
+
+ sym_tab = (char *) new (hdr.ar_size);
+
+ if ((off_t) fread (sym_tab, 1, hdr.ar_size, libfp) != hdr.ar_size)
+ {
+ free (sym_tab);
+ sym_tab_size = 0;
+ return This;
+ }
+ sym_tab_size = hdr.ar_size;
+ }
+ else
+ {
+ long moduleOffset = ftell (libfp);
+
+ /* Opened OK - create a new libraryfile object for it */
+ if (This == NULL)
+ {
+ assert (libr == NULL);
+ libr = This = (pmlibraryfile) new (sizeof (mlibraryfile));
+ }
+ else
+ {
+ This->next = (pmlibraryfile) new (sizeof (mlibraryfile));
+ This = This->next;
+ }
+ This->next = NULL;
+ This->loaded = -1;
+ This->libspc = lbnh->libspc;
+ This->offset = moduleOffset - ARHDR_LEN;
+
+ This->relfil = get_member_name (hdr.ar_name); /* member name */
+ This->filspc = strdup (This->relfil); /* member file name */
+
+ D (" Indexing module: %s\n", This->relfil);
+
+ This->type = type;
+
+ /* start a new linked list of symbols for this module. */
+ This->symbols = NULL;
+
+ add_rel_index (libfp, hdr.ar_size, This);
+
+ fseek (libfp, moduleOffset + hdr.ar_size, SEEK_SET);
+ }
+
+ if (hdr.ar_size & 1)
+ {
+ int c = getc (libfp);
+ assert (c == EOF || c == '\n');
+ }
+ }
+
+ if (NULL != sym_tab)
+ {
+ free (sym_tab);
+ sym_tab = NULL;
+ sym_tab_size = 0;
+ }
+
+ return This;
+}
+
+#else
+
+#if 0
+static int
+load_adb (FILE * libfp, struct lbfile *lbfh)
+{
+ struct ar_hdr hdr;
+ char *adb_name;
+
+ /* check if it is a .rel file */
+ if (0 != stricmp (&lbfh->relfil[strlen (lbfh->relfil) - 4], ".rel"))
+ return 0;
+
+
+ adb_name = (char *) new (strlen (lbfh->relfil) + 1);
+ memcpy (adb_name, lbfh->relfil, strlen (lbfh->relfil) - 4);
+ memcpy (&adb_name[strlen (lbfh->relfil) - 4], ".adb", 5);
+
+ if (!is_ar (libfp))
+ {
+ fprintf (stderr, "?ASlink-Error-%s is not an archive\n", lbfh->libspc);
+ fclose (libfp);
+ lkexit (1);
+ }
+
+
+ /* walk trough all archive members */
+ while (ar_get_header (&hdr, libfp))
+ {
+ if (AR_IS_STRING_TABLE (hdr))
+ {
+ if (sym_tab)
+ free (sym_tab);
+
+ sym_tab = (char *) new (hdr.ar_size);
+
+ if ((off_t) fread (sym_tab, 1, hdr.ar_size, libfp) != hdr.ar_size)
+ {
+ free (sym_tab);
+ sym_tab_size = 0;
+ return 0;
+ }
+ sym_tab_size = hdr.ar_size;
+ }
+ if (AR_IS_SYMBOL_TABLE (hdr) || 0 != stricmp (get_member_name (hdr.ar_name), adb_name))
+ {
+ /* skip the mamber */
+ fseek (libfp, hdr.ar_size + (hdr.ar_size & 1), SEEK_CUR);
+ }
+ else
+ {
+ long left = hdr.ar_size;
+ char buf[4096];
+
+ while (left)
+ {
+ size_t n = min (left, sizeof buf);
+
+ if (fread (buf, 1, n, libfp) != n)
+ {
+ assert (0);
+ }
+
+ fwrite (buf, 1, n, dfp);
+
+ left -= n;
+ }
+
+ if (hdr.ar_size & 1)
+ {
+ int c = getc (libfp);
+ assert (c == EOF || c == '\n');
+ }
+
+ free (adb_name);
+ return 1;
+ }
+ }
+
+ free (adb_name);
+ return 0;
+}
+#endif
+
+static int
+fndsym_ar (const char *name, struct lbname *lbnh, FILE * libfp, int type)
+{
+ struct ar_hdr hdr;
+ int ret = 0;
+
+ /* walk trough all archive members */
+ while (ar_get_header (&hdr, libfp))
+ {
+ char filspc[PATH_MAX];
+
+ if (lbnh->path != NULL)
+ {
+ strcpy (filspc, lbnh->path);
+#ifdef OTHERSYSTEM
+ if (*filspc != '\0' && (filspc[strlen (filspc) - 1] != '/') && (filspc[strlen (filspc) - 1] != LKDIRSEP))
+ {
+ strcat (filspc, LKDIRSEPSTR);
+ }
+#endif
+ }
+
+ if (AR_IS_SYMBOL_TABLE (hdr))
+ {
+ char *buf, *po, *ps;
+ int i;
+ long nsym;
+
+ buf = (char *) new (hdr.ar_size);
+
+ if ((off_t) fread (buf, 1, hdr.ar_size, libfp) != hdr.ar_size)
+ {
+ free (buf);
+ return 0;
+ }
+
+ nsym = sgetl (buf);
+
+ po = buf + 4;
+ ps = po + nsym * 4;
+
+ for (i = 0; i < nsym; ++i)
+ {
+ char *sym;
+ long offset;
+
+ offset = sgetl (po);
+ po += 4;
+
+ sym = ps;
+ while (*ps++ != '\0')
+ ;
+
+ if (0 == strcmp (name, sym))
+ {
+ fseek (libfp, offset, SEEK_SET);
+ if (ar_get_header (&hdr, libfp))
+ {
+ sprintf (&filspc[strlen (filspc)], "%s", hdr.ar_name);
+
+ /* If this module has been loaded already don't load it again. */
+ if (!is_module_loaded (filspc))
+ {
+ struct lbfile *lbfh, *lbf;
+
+ lbfh = (struct lbfile *) new (sizeof (struct lbfile));
+ lbfh->libspc = strdup (lbnh->libspc);
+ lbfh->relfil = strdup (hdr.ar_name);
+ lbfh->filspc = strdup (filspc);
+ lbfh->offset = offset;
+ lbfh->type = type;
+
+ if (lbfhead == NULL)
+ {
+ lbfhead = lbfh;
+ }
+ else
+ {
+ for (lbf = lbfhead; lbf->next != NULL; lbf = lbf->next)
+ ;
+
+ lbf->next = lbfh;
+ }
+
+ D ("Loading module %s from file %s.\n", hdr.ar_name, lbfh->libspc);
+ load_rel (libfp, hdr.ar_size);
+ ///* if cdb information required & .adb file present */
+ //if (dflag && dfp)
+ // {
+ // if (load_adb(FILE *libfp, struct lbfile *lbfh))
+ // SaveLinkedFilePath (filspc);
+ // }
+ ret = 1;
+ break;
+ }
+ }
+ else
+ {
+ fprintf (stderr, "?ASlink-Error-Bad offset in library file %s(%s)\n", lbnh->libspc, name);
+ fclose (libfp);
+ lkexit (1);
+ }
+ }
+ }
+ free (buf);
+
+ break;
+ }
+ else if (AR_IS_STRING_TABLE (hdr))
+ {
+ if (sym_tab)
+ free (sym_tab);
+
+ sym_tab = (char *) new (hdr.ar_size);
+
+ if ((off_t) fread (sym_tab, 1, hdr.ar_size, libfp) != hdr.ar_size)
+ {
+ free (sym_tab);
+ sym_tab = NULL;
+ sym_tab_size = 0;
+ return 0;
+ }
+ sym_tab_size = hdr.ar_size;
+ }
+ else
+ {
+ long moduleOffset = ftell (libfp);
+
+ D (" Module: %s\n", hdr.ar_name);
+
+ sprintf (&filspc[strlen (filspc)], "%s", hdr.ar_name);
+
+ /* Opened OK - create a new libraryfile object for it */
+ ret = add_rel_file (name, lbnh, hdr.ar_name, filspc, moduleOffset - ARHDR_LEN, libfp, hdr.ar_size, type);
+ ///* if cdb information required & .adb file present */
+ //if (dflag && dfp)
+ // {
+ // if (load_adb(FILE *libfp, struct lbfile *lbfh))
+ // SaveLinkedFilePath (filspc);
+ // }
+ if (ret)
+ break;
+
+ fseek (libfp, moduleOffset + hdr.ar_size, SEEK_SET);
+ }
+
+ if (hdr.ar_size & 1)
+ {
+ int c = getc (libfp);
+ assert (c == EOF || c == '\n');
+ }
+ }
+
+ if (NULL != sym_tab)
+ {
+ free (sym_tab);
+ sym_tab = NULL;
+ sym_tab_size = 0;
+ }
+
+ return ret;
+}
+#endif
+
+struct aslib_target aslib_target_ar = {
+ &is_ar,
+#ifdef INDEXLIB
+ &buildlibraryindex_ar,
+#else
+ &fndsym_ar,
+#endif
+ &loadfile_ar,
+};
--- /dev/null
+/* lkar.h - ar library format handling
+
+ Copyright (C) 2008-2009 Borut Razem, borut dot razem at siol dot net
+
+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 2, 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, write to the Free Software
+Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef __LKAR_H
+#define __LKAR_H
+
+#include <sys/types.h>
+#include <string.h>
+
+
+#ifdef _WIN32
+typedef unsigned short mode_t;
+typedef short uid_t;
+typedef short gid_t;
+typedef _off_t off_t;
+#endif
+
+#ifdef WORDS_BIGENDIAN
+#define sgetl(buf) (((((((unsigned char)(buf)[3] << 8) + (unsigned char)(buf)[2]) << 8) + (unsigned char)(buf)[1]) << 8) + (unsigned char)(buf)[0])
+#define sputl(value, buf) ((buf)[3] = ((value) >> 24, (buf)[2] = (value) >> 16, (buf)[1] = (value) >> 8, (buf)[0] = (value))
+#else
+#define sgetl(buf) (((((((unsigned char)(buf)[0] << 8) + (unsigned char)(buf)[1]) << 8) + (unsigned char)(buf)[2]) << 8) + (unsigned char)(buf)[3])
+#define sputl(value, buf) ((buf)[0] = (value) >> 24, (buf)[1] = (value) >> 16, (buf)[2] = (value) >> 8, (buf)[3] = (value))
+#endif
+
+#define ARMAG "!<arch>\n" /* magic string */
+#define SARMAG (sizeof (ARMAG) - 1) /* length of magic string */
+
+#define ARFMAG "`\n" /* header trailer string */
+
+#define AR_NAME_OFFSET 0
+#define AR_NAME_LEN 16
+
+#define AR_DATE_OFFSET 16
+#define AR_DATE_LEN 12
+
+#define AR_UID_OFFSET 28
+#define AR_UID_LEN 6
+
+#define AR_GID_OFFSET 34
+#define AR_GID_LEN 6
+
+#define AR_MODE_OFFSET 40
+#define AR_MODE_LEN 8
+
+#define AR_SIZE_OFFSET 48
+#define AR_SIZE_LEN 10
+
+#define AR_FMAG_OFFSET 58
+#define AR_FMAG_LEN (sizeof (ARFMAG) - 1)
+
+#define ARHDR_LEN (AR_NAME_LEN + AR_DATE_LEN + AR_UID_LEN + AR_GID_LEN + AR_MODE_LEN + AR_SIZE_LEN + AR_FMAG_LEN)
+
+#define AR_SYMBOL_TABLE_NAME "/ "
+#define AR_STRING_TABLE_NAME "// "
+
+#define AR_IS_SYMBOL_TABLE(hdr) (0 == strcmp((hdr).ar_name, AR_SYMBOL_TABLE_NAME))
+#define AR_IS_STRING_TABLE(hdr) (0 == strcmp((hdr).ar_name, AR_STRING_TABLE_NAME))
+
+
+struct ar_hdr /* archive member header */
+{
+ char ar_name[AR_NAME_LEN + 1]; /* archive member name */
+ time_t ar_date; /* archive member date */
+ uid_t ar_uid; /* archive member user identification */
+ gid_t ar_gid; /* archive member group identification */
+ mode_t ar_mode; /* archive member mode (octal) */
+ off_t ar_size; /* archive member size */
+};
+
+#endif /* __LKAR_H */
-/* lklib.c */
+/* lklib.c
+
+ Copyright (C) 1989-1995 Alan R. Baldwin
+ 721 Berkeley St., Kent, Ohio 44240
+ Copyright (C) 2008-2009 Borut Razem, borut dot razem at siol dot net
+
+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 2, 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, write to the Free Software
+Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/*
- * (C) Copyright 1989-1995
- * All Rights Reserved
- *
- * Alan R. Baldwin
- * 721 Berkeley St.
- * Kent, Ohio 44240
- *
* With contributions for the
* object libraries from
* Ken Hornstein
This->loaded = -1;
This->libspc = lbnh->libspc;
This->relfil = strdup (relfil);
- This->filename = strdup (str);
+ This->filspc = strdup (str);
This->type = type;
/* Start a new linked list of symbols for this module: */
{
char relfil[NINPUT];
+ D ("Searching symbol: %s\n", name);
+
while (getline (relfil, sizeof (relfil), libfp) != NULL)
{
char str[PATH_MAX];
fclose (fp);
if (ret)
{
+ D ("Loaded module %s from file %s.\n", str, str);
/* if cdb information required & adb file present */
if (dflag && dfp)
{
-/* lklibr.c */
+/* lklibr.c
+
+ Copyright (C) 1989-1995 Alan R. Baldwin
+ 721 Berkeley St., Kent, Ohio 44240
+ Copyright (C) 2008-2009 Borut Razem, borut dot razem at siol dot net
+
+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 2, 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, write to the Free Software
+Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/*
- * (C) Copyright 1989-1995
- * All Rights Reserved
- *
- * Alan R. Baldwin
- * 721 Berkeley St.
- * Kent, Ohio 44240
- *
* With contributions for the
* object libraries from
* Ken Hornstein
struct aslib_target *aslib_targets[] = {
&aslib_target_sdcclib,
+ &aslib_target_ar,
&aslib_target_lib,
};
pmlibraryfile FirstFound;
int numfound = 0;
+ D ("Searching symbol: %s\n", name);
+
/* Build the index if this is the first call to fndsym */
if (libr == NULL)
buildlibraryindex ();
/* Iterate through all library object files */
- ThisLibr = libr;
- FirstFound = libr; /*So gcc stops whining */
- while (ThisLibr)
+ FirstFound = libr; /* So gcc stops whining */
+ for (ThisLibr = libr; ThisLibr != NULL; ThisLibr = ThisLibr->next)
{
/* Iterate through all symbols in an object file */
- ThisSym = ThisLibr->symbols;
-
- while (ThisSym)
+ for (ThisSym = ThisLibr->symbols; ThisSym != NULL; ThisSym = ThisSym->next)
{
if (!strcmp (ThisSym->name, name))
{
}
else
{
- lbf = lbfhead;
- while (lbf->next)
- {
- lbf = lbf->next;
- }
+ for (lbf = lbfhead; lbf->next != NULL; lbf = lbf->next)
+ ;
+
lbf->next = lbfh;
}
lbfh->libspc = ThisLibr->libspc;
- lbfh->filspc = ThisLibr->filename;
+ lbfh->filspc = ThisLibr->filspc;
lbfh->relfil = strdup (ThisLibr->relfil);
lbfh->offset = ThisLibr->offset;
lbfh->type = ThisLibr->type;
}
}
}
- ThisSym = ThisSym->next; /* Next sym in library */
}
- ThisLibr = ThisLibr->next; /* Next library in list */
}
return numfound;
}
struct add_sym_s *as = (struct add_sym_s *) param;
pmlibrarysymbol ps = (pmlibrarysymbol) new (sizeof (mlibrarysymbol));
+ D (" Indexing symbol: %s\n", sym);
+
as->plf->loaded = 0;
ps->next = NULL;
ps->name = strdup (sym);
FILE *libfp;
int i;
+ D ("Indexing library: %s\n", lbnh->libspc);
+
if ((libfp = fopen (lbnh->libspc, "rb")) == NULL)
{
fprintf (stderr, "?ASlink-Error-Cannot open library file %s\n", lbnh->libspc);
return 0;
}
-/*Release all memory allocated for the in-memory library index*/
+/* Release all memory allocated for the in-memory library index */
void
freelibraryindex (void)
{
ThisSym = ThisSym->next;
free (ThisSym2Free);
}
- free (ThisLibr->filename);
+ free (ThisLibr->filspc);
free (ThisLibr->relfil);
ThisLibr2Free = ThisLibr;
ThisLibr = ThisLibr->next;
{
struct load_sym_s *ls = (struct load_sym_s *) params;
+ D (" Symbol: %s\n", sym);
+
if (strcmp (ls->name, sym) == 0)
{
struct lbfile *lbfh, *lbf;
+ D (" Symbol %s found in module %s!\n", sym, ls->relfil);
+
lbfh = (struct lbfile *) new (sizeof (struct lbfile));
lbfh->libspc = ls->lbnh->libspc;
lbfh->relfil = strdup (ls->relfil);
lbfh->type = ls->type;
if (lbfhead == NULL)
- {
- lbfhead = lbfh;
- }
+ lbfhead = lbfh;
else
{
- lbf = lbfhead;
- while (lbf->next)
- {
- lbf = lbf->next;
- }
+ for (lbf = lbfhead; lbf->next != NULL; lbf = lbf->next)
+ ;
lbf->next = lbfh;
}
-
(*aslib_targets[ls->type]->loadfile) (lbfh);
return 1;
return 0;
}
+/*)Function int is_module_loaded(filspc)
+ *
+ * If this module has been already loaded
+ */
+
+int
+is_module_loaded (const char *filspc)
+{
+ struct lbfile *lbf;
+
+ for (lbf = lbfhead; lbf != NULL; lbf = lbf->next)
+ {
+ if (EQ (filspc, lbf->filspc))
+ {
+ D (" Module %s already loaded!\n", filspc);
+ return 1; /* Module already loaded */
+ }
+ }
+ return 0;
+}
+
int
add_rel_file (const char *name, struct lbname *lbnh, const char *relfil,
const char *filspc, int offset, FILE * fp, long size, int type)
{
struct load_sym_s ls;
- ls.name = name;
- ls.lbnh = lbnh;
- ls.relfil = relfil;
- ls.filspc = filspc;
- ls.offset = offset;
- ls.type = type;
-
- return enum_symbols (fp, size, &load_sybmol, &ls);
+
+ /* If this module has been loaded already don't load it again. */
+ if (is_module_loaded (filspc))
+ return 0;
+ else
+ {
+ ls.name = name;
+ ls.lbnh = lbnh;
+ ls.relfil = relfil;
+ ls.filspc = filspc;
+ ls.offset = offset;
+ ls.type = type;
+
+ return enum_symbols (fp, size, &load_sybmol, &ls);
+ }
}
int
/*
* Search through every library in the linked list "lbnhead".
*/
+
+ D ("Searching symbol: %s\n", name);
+
for (lbnh = lbnhead; lbnh; lbnh = lbnh->next)
{
int ret = 0;
+ D ("Library: %s\n", lbnh->libspc);
+
if ((libfp = fopen (lbnh->libspc, "rb")) == NULL)
{
fprintf (stderr, "?ASlink-Error-Cannot open library file %s\n", lbnh->libspc);
-/* lklibr.h */
+/* lklibr.h
+
+ Copyright (C) 1989-1995 Alan R. Baldwin
+ 721 Berkeley St., Kent, Ohio 44240
+ Copyright (C) 2008 Borut Razem, borut dot razem at siol dot net
+
+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 2, 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, write to the Free Software
+Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/*
- * (C) Copyright 1989-1995
- * All Rights Reserved
- *
- * Alan R. Baldwin
- * 721 Berkeley St.
- * Kent, Ohio 44240
- *
* With contributions for the
* object libraries from
* Ken Hornstein
#include <stdio.h>
+#ifdef INDEXLIB
typedef struct slibrarysymbol mlibrarysymbol;
typedef struct slibrarysymbol *pmlibrarysymbol;
struct slibrarysymbol
{
- char *name; /*Warning: allocate memory before using */
+ char *name; /* Warning: allocate memory before using */
pmlibrarysymbol next;
};
int loaded;
char *libspc;
char *relfil; /* Warning: allocate memory before using */
- char *filename; /* Warning: allocate memory before using */
+ char *filspc; /* Warning: allocate memory before using */
long offset; /* The embedded file offset in the library file libspc */
unsigned int type;
pmlibrarysymbol symbols;
extern pmlibraryfile libr;
-#ifdef INDEXLIB
pmlibrarysymbol add_rel_index (FILE * fp, long size, pmlibraryfile This);
#else
+int is_module_loaded (const char *filspc);
int add_rel_file (const char *name, struct lbname *lbnh, const char *relfil,
const char *filspc, int offset, FILE * fp, long size, int type);
#endif
};
extern struct aslib_target aslib_target_sdcclib;
+extern struct aslib_target aslib_target_ar;
extern struct aslib_target aslib_target_lib;
+////
+//#define DEBUG_PRINT
+
+#ifdef DEBUG_PRINT
+# define D printf
+#else
+# define D 1 ? (void)0 : (*(void (*)(const char *, ...))0)
+#endif
+
#endif /* __LKLIBR_H */
-/* lkrel.c */
+/* lkrel.c - .rel object file handling
+
+ Copyright (C) 1989-1995 Alan R. Baldwin
+ 721 Berkeley St., Kent, Ohio 44240
+ Copyright (C) 2008-2009 Borut Razem, borut dot razem at siol dot net
+
+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 2, 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, write to the Free Software
+Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/*
- * (C) Copyright 1989-1995
- * All Rights Reserved
- *
- * Alan R. Baldwin
- * 721 Berkeley St.
- * Kent, Ohio 44240
- *
* With contributions for the
* object libraries from
* Ken Hornstein
if (((c = getc (libfp)) == 'X' || c == 'D' || c == 'Q') && ((c = getc (libfp)) == 'H' || c == 'L'))
{
switch (getc (libfp))
- {
- case '\r':
- if (getc (libfp) == '\n')
- ret = 1;
- break;
-
- case '\n':
- ret = 1;
- }
+ {
+ case '\r':
+ if (getc (libfp) == '\n')
+ ret = 1;
+ break;
+
+ case '\n':
+ ret = 1;
+ }
}
else if (c == ';')
{
char buf[6];
if (fread (buf, 1, sizeof (buf), libfp) == sizeof (buf) && memcmp (buf, "!FILE ", 6) == 0)
- ret = 1;
+ ret = 1;
}
fseek (libfp, pos, SEEK_SET);
return ret;
end = (size >= 0) ? ftell (libfp) + size : -1;
while ((end < 0 || ftell (libfp) < end) && getline (str, sizeof (str), libfp) != NULL)
- {
- if (0 == strcmp (str, "</REL>"))
- return 1;
+ {
+ if (0 == strcmp (str, "</REL>"))
+ return 1;
- ip = str;
- link_main ();
- }
+ ip = str;
+ link_main ();
+ }
return 1;
}
* our object file and don't go into the next one.
*/
- while ((end <= 0 || ftell (fp) < end) && getline (buf, sizeof (buf), fp) != NULL)
+ while ((end < 0 || ftell (fp) < end) && getline (buf, sizeof (buf), fp) != NULL)
{
char symname[NINPUT];
char c;
* All 'S line's preceed 'T line's in .REL files.
*/
if (buf[0] == 'T')
- break;
+ break;
/*
* Skip everything that's not a symbol record.
*/
if (buf[0] != 'S')
- continue;
+ continue;
sscanf (buf, "S %s %c", symname, &c);
/* If it's an actual symbol, record it */
if (c == 'D')
- {
- if ((*func) (symname, param))
- return 1;
- }
+ {
+ if ((*func) (symname, param))
+ return 1;
+ }
}
return 0;
-/* lkrel.h */
+/* lkrel.h - .rel object file handling
+
+ Copyright (C) 1989-1995 Alan R. Baldwin
+ 721 Berkeley St., Kent, Ohio 44240
+ Copyright (C) 2008-2009 Borut Razem, borut dot razem at siol dot net
+
+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 2, 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, write to the Free Software
+Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/*
- * (C) Copyright 1989-1995
- * All Rights Reserved
- *
- * Alan R. Baldwin
- * 721 Berkeley St.
- * Kent, Ohio 44240
- *
* With contributions for the
* object libraries from
* Ken Hornstein
*
*/
+/*
+ * Extensions: P. Felber
+ */
+
#ifndef __LKREL_H
#define __LKREL_H
}
#endif
-#endif /* __LKREL_H */
+#endif /* __LKREL_H */
-/* lksdcclib.c */
+/* lksdcclib.c - sdcc library format handling
+
+ Copyright (C) 1989-1995 Alan R. Baldwin
+ 721 Berkeley St., Kent, Ohio 44240
+ Copyright (C) 2008 Borut Razem, borut dot razem at siol dot net
+
+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 2, 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, write to the Free Software
+Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/*
- * (C) Copyright 1989-1995
- * All Rights Reserved
- *
- * Alan R. Baldwin
- * 721 Berkeley St.
- * Kent, Ohio 44240
- *
* With contributions for the
* object libraries from
* Ken Hornstein
static pmlibraryfile
buildlibraryindex_sdcclib (struct lbname *lbnh, FILE * libfp, pmlibraryfile This, int type)
{
- char ModName[NCPS] = "";
char FLine[MAXLINE];
- char buff[PATH_MAX];
int state = 0;
- long IndexOffset = 0, FileOffset;
+ long IndexOffset = 0;
pmlibrarysymbol ThisSym = NULL;
while (getline (FLine, sizeof (FLine), libfp))
case 1:
if (EQ (FLine, "<MODULE>"))
{
+ char buff[PATH_MAX];
+ char ModName[NCPS] = "";
+ long FileOffset;
+
/* The next line has the name of the module and the offset
of the corresponding embedded file in the library */
getline (FLine, sizeof (FLine), libfp);
This->libspc = lbnh->libspc;
This->relfil = strdup (ModName);
sprintf (buff, "%s%s%c%s", lbnh->path, ModName, FSEPX, LKOBJEXT);
- This->filename = strdup (buff);
+ This->filspc = strdup (buff);
This->type = type;
This->symbols = ThisSym = NULL; /* Start a new linked list of symbols */
static int
findsym_sdcclib (const char *name, struct lbname *lbnh, FILE * libfp, int type)
{
- struct lbfile *lbfh, *lbf;
+ struct lbfile *lbfh;
char ModName[NCPS] = "";
char FLine[MAXLINE];
int state = 0;
while (getline (FLine, sizeof (FLine), libfp))
{
- char str[PATH_MAX];
+ char filspc[PATH_MAX];
if (lbnh->path != NULL)
{
- strcpy (str, lbnh->path);
+ strcpy (filspc, lbnh->path);
#ifdef OTHERSYSTEM
- if (*str != '\0' && (str[strlen (str) - 1] != '/') && (str[strlen (str) - 1] != LKDIRSEP))
+ if (*filspc != '\0' && (filspc[strlen (filspc) - 1] != '/') && (filspc[strlen (filspc) - 1] != LKDIRSEP))
{
- strcat (str, LKDIRSEPSTR);
+ strcat (filspc, LKDIRSEPSTR);
}
#endif
}
/* As in the original library format, it is assumed that the .rel
files reside in the same directory as the lib files. */
- sprintf (&str[strlen (str)], "%s%c%s", ModName, FSEPX, LKOBJEXT);
+ sprintf (&filspc[strlen (filspc)], "%s%c%s", ModName, FSEPX, LKOBJEXT);
/* If this module has been loaded already don't load it again. */
- lbf = lbfhead;
- while (lbf)
- {
- if (EQ (str, lbf->filspc))
- return 1; /* Already loaded */
- lbf = lbf->next;
- }
+ if (is_module_loaded (filspc))
+ return 1;
/* Add the embedded file to the list of files to be loaded in
the second pass. That is performed latter by the function
}
else
{
- lbf = lbfhead;
- while (lbf->next)
- {
- lbf = lbf->next;
- }
+ struct lbfile *lbf;
+
+ for (lbf = lbfhead; lbf->next; lbf = lbf->next)
+ ;
+
lbf->next = lbfh;
}
lbfh->libspc = lbnh->libspc;
- lbfh->filspc = strdup (str);
+ lbfh->filspc = strdup (filspc);
lbfh->relfil = strdup (ModName);
/* Library embedded file, so lbfh->offset must be >=0 */
lbfh->offset = IndexOffset + FileOffset;
if (dflag && dfp)
{
if (LoadAdb (libfp))
- SaveLinkedFilePath (str);
+ SaveLinkedFilePath (filspc);
}
return 1; /* Found the symbol, so success! */
}
ASXXLIBSRC = strcmpi.c
-LKLIBSRC = getline.c lkaomf51.c lkdata.c lkeval.c \
+LKLIBSRC = getline.c lkaomf51.c lkar.c lkdata.c lkeval.c \
lkhead.c lklex.c lklib.c lklibr.c lklist.c \
lknoice.c lkrel.c lksdcclib.c lkstore.c lksym.c
# End Source File\r
# Begin Source File\r
\r
+SOURCE=..\lkar.c\r
+# End Source File\r
+# Begin Source File\r
+\r
SOURCE=.\lkarea.c\r
# End Source File\r
# Begin Source File\r
# End Source File\r
# Begin Source File\r
\r
+SOURCE=..\lkar.h\r
+# End Source File\r
+# Begin Source File\r
+\r
SOURCE=..\lklibr.h\r
# End Source File\r
# Begin Source File\r
LKLIB = $(srcdir)/..
-LKLIBSRC = getline.c lkaomf51.c lkdata.c lkeval.c \
+LKLIBSRC = getline.c lkaomf51.c lkar.c lkdata.c lkeval.c \
lkhead.c lklex.c lklib.c lklibr.c lklist.c \
lknoice.c lkrel.c lksdcclib.c lkstore.c lksym.c
# End Source File\r
# Begin Source File\r
\r
+SOURCE=..\lkar.c\r
+# End Source File\r
+# Begin Source File\r
+\r
SOURCE=.\lkarea.c\r
# End Source File\r
# Begin Source File\r
# End Source File\r
# Begin Source File\r
\r
+SOURCE=..\lkar.h\r
+# End Source File\r
+# Begin Source File\r
+\r
SOURCE=..\lklibr.h\r
# End Source File\r
# Begin Source File\r
# End Source File\r
# Begin Source File\r
\r
+SOURCE=..\lkar.c\r
+# End Source File\r
+# Begin Source File\r
+\r
SOURCE=.\lkarea.c\r
# End Source File\r
# Begin Source File\r
# End Source File\r
# Begin Source File\r
\r
+SOURCE=..\lkar.h\r
+# End Source File\r
+# Begin Source File\r
+\r
SOURCE=..\lklibr.h\r
# End Source File\r
# Begin Source File\r
test $OPT_DISABLE_DEVICE_LIB = 0 && ac_config_files="$ac_config_files device/lib/Makefile"
-ac_config_files="$ac_config_files main.mk:main_in.mk src/Makefile device/include/Makefile support/librarian/Makefile support/makebin/Makefile support/regression/Makefile support/valdiag/Makefile Makefile Makefile.common:Makefile.common.in"
+ac_config_files="$ac_config_files main.mk:main_in.mk src/Makefile device/include/Makefile as/asranlib/Makefile support/librarian/Makefile support/makebin/Makefile support/regression/Makefile support/valdiag/Makefile Makefile Makefile.common:Makefile.common.in"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
"main.mk") CONFIG_FILES="$CONFIG_FILES main.mk:main_in.mk" ;;
"src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
"device/include/Makefile") CONFIG_FILES="$CONFIG_FILES device/include/Makefile" ;;
+ "as/asranlib/Makefile") CONFIG_FILES="$CONFIG_FILES as/asranlib/Makefile" ;;
"support/librarian/Makefile") CONFIG_FILES="$CONFIG_FILES support/librarian/Makefile" ;;
"support/makebin/Makefile") CONFIG_FILES="$CONFIG_FILES support/makebin/Makefile" ;;
"support/regression/Makefile") CONFIG_FILES="$CONFIG_FILES support/regression/Makefile" ;;
AC_CONFIG_FILES([main.mk:main_in.mk
src/Makefile
device/include/Makefile
+as/asranlib/Makefile
support/librarian/Makefile
support/makebin/Makefile
support/regression/Makefile
\r
###############################################################################\r
\r
-Project: "all"=".\all.dsp" - Package Owner=<4>\r
+Project: "all"=.\all.dsp - Package Owner=<4>\r
\r
Package=<5>\r
{{{\r
\r
###############################################################################\r
\r
-Project: "as_gbz80"=".\as\z80\as_gbz80.dsp" - Package Owner=<4>\r
+Project: "as_gbz80"=.\as\z80\as_gbz80.dsp - Package Owner=<4>\r
\r
Package=<5>\r
{{{\r
\r
###############################################################################\r
\r
-Project: "as_hc08"=".\as\hc08\as_hc08.dsp" - Package Owner=<4>\r
+Project: "as_hc08"=.\as\hc08\as_hc08.dsp - Package Owner=<4>\r
\r
Package=<5>\r
{{{\r
\r
###############################################################################\r
\r
-Project: "as_z80"=".\as\z80\as_z80.dsp" - Package Owner=<4>\r
+Project: "as_z80"=.\as\z80\as_z80.dsp - Package Owner=<4>\r
\r
Package=<5>\r
{{{\r
\r
###############################################################################\r
\r
-Project: "aslink"=".\as\link\mcs51\aslink.dsp" - Package Owner=<4>\r
+Project: "aslink"=.\as\link\mcs51\aslink.dsp - Package Owner=<4>\r
\r
Package=<5>\r
{{{\r
\r
###############################################################################\r
\r
-Project: "asx8051"=".\as\mcs51\asx8051.dsp" - Package Owner=<4>\r
+Project: "asranlib"=.\as\asranlib\asranlib.dsp - Package Owner=<4>\r
\r
Package=<5>\r
{{{\r
\r
Package=<4>\r
{{{\r
+ Begin Project Dependency\r
+ Project_Dep_Name config\r
+ End Project Dependency\r
}}}\r
\r
###############################################################################\r
\r
-Project: "avr"=".\src\avr\avr.dsp" - Package Owner=<4>\r
+Project: "asx8051"=.\as\mcs51\asx8051.dsp - Package Owner=<4>\r
+\r
+Package=<5>\r
+{{{\r
+}}}\r
+\r
+Package=<4>\r
+{{{\r
+}}}\r
+\r
+###############################################################################\r
+\r
+Project: "avr"=.\src\avr\avr.dsp - Package Owner=<4>\r
\r
Package=<5>\r
{{{\r
\r
###############################################################################\r
\r
-Project: "avra"=".\src\avr\avra.dsp" - Package Owner=<4>\r
+Project: "avra"=.\src\avr\avra.dsp - Package Owner=<4>\r
\r
Package=<5>\r
{{{\r
\r
###############################################################################\r
\r
-Project: "config"=".\config.dsp" - Package Owner=<4>\r
+Project: "config"=.\config.dsp - Package Owner=<4>\r
\r
Package=<5>\r
{{{\r
\r
###############################################################################\r
\r
-Project: "ds390"=".\src\ds390\ds390.dsp" - Package Owner=<4>\r
+Project: "ds390"=.\src\ds390\ds390.dsp - Package Owner=<4>\r
\r
Package=<5>\r
{{{\r
\r
###############################################################################\r
\r
-Project: "ds390a"=".\src\ds390\ds390a.dsp" - Package Owner=<4>\r
+Project: "ds390a"=.\src\ds390\ds390a.dsp - Package Owner=<4>\r
\r
Package=<5>\r
{{{\r
\r
###############################################################################\r
\r
-Project: "hc08"=".\src\hc08\hc08.dsp" - Package Owner=<4>\r
+Project: "hc08"=.\src\hc08\hc08.dsp - Package Owner=<4>\r
\r
Package=<5>\r
{{{\r
\r
###############################################################################\r
\r
-Project: "hc08a"=".\src\hc08\hc08a.dsp" - Package Owner=<4>\r
+Project: "hc08a"=.\src\hc08\hc08a.dsp - Package Owner=<4>\r
\r
Package=<5>\r
{{{\r
\r
###############################################################################\r
\r
-Project: "librarian"=".\support\librarian\librarian.dsp" - Package Owner=<4>\r
+Project: "librarian"=.\support\librarian\librarian.dsp - Package Owner=<4>\r
\r
Package=<5>\r
{{{\r
\r
###############################################################################\r
\r
-Project: "link_hc08"=".\as\link\hc08\link_hc08.dsp" - Package Owner=<4>\r
+Project: "link_hc08"=.\as\link\hc08\link_hc08.dsp - Package Owner=<4>\r
\r
Package=<5>\r
{{{\r
\r
Package=<4>\r
{{{\r
+ Begin Project Dependency\r
+ Project_Dep_Name config\r
+ End Project Dependency\r
}}}\r
\r
###############################################################################\r
\r
-Project: "linkgbz80"=".\as\link\z80\linkgbz80.dsp" - Package Owner=<4>\r
+Project: "linkgbz80"=.\as\link\z80\linkgbz80.dsp - Package Owner=<4>\r
\r
Package=<5>\r
{{{\r
\r
###############################################################################\r
\r
-Project: "linkz80"=".\as\link\z80\linkz80.dsp" - Package Owner=<4>\r
+Project: "linkz80"=.\as\link\z80\linkz80.dsp - Package Owner=<4>\r
\r
Package=<5>\r
{{{\r
\r
###############################################################################\r
\r
-Project: "mcs51"=".\src\mcs51\mcs51.dsp" - Package Owner=<4>\r
+Project: "mcs51"=.\src\mcs51\mcs51.dsp - Package Owner=<4>\r
\r
Package=<5>\r
{{{\r
\r
###############################################################################\r
\r
-Project: "mcs51a"=".\src\mcs51\mcs51a.dsp" - Package Owner=<4>\r
+Project: "mcs51a"=.\src\mcs51\mcs51a.dsp - Package Owner=<4>\r
\r
Package=<5>\r
{{{\r
\r
###############################################################################\r
\r
-Project: "packihx"=".\support\packihx\PackIhx.dsp" - Package Owner=<4>\r
+Project: "packihx"=.\support\packihx\PackIhx.dsp - Package Owner=<4>\r
\r
Package=<5>\r
{{{\r
\r
###############################################################################\r
\r
-Project: "pic"=".\src\pic\pic.dsp" - Package Owner=<4>\r
+Project: "pic"=.\src\pic\pic.dsp - Package Owner=<4>\r
\r
Package=<5>\r
{{{\r
\r
###############################################################################\r
\r
-Project: "pic16"=".\src\pic16\pic16.dsp" - Package Owner=<4>\r
+Project: "pic16"=.\src\pic16\pic16.dsp - Package Owner=<4>\r
\r
Package=<5>\r
{{{\r
\r
###############################################################################\r
\r
-Project: "pic16a"=".\src\pic16\pic16a.dsp" - Package Owner=<4>\r
+Project: "pic16a"=.\src\pic16\pic16a.dsp - Package Owner=<4>\r
\r
Package=<5>\r
{{{\r
\r
###############################################################################\r
\r
-Project: "pica"=".\src\pic\pica.dsp" - Package Owner=<4>\r
+Project: "pica"=.\src\pic\pica.dsp - Package Owner=<4>\r
\r
Package=<5>\r
{{{\r
\r
###############################################################################\r
\r
-Project: "sdcpp"=".\support\cpp\sdcpp.dsp" - Package Owner=<4>\r
+Project: "sdcpp"=.\support\cpp\sdcpp.dsp - Package Owner=<4>\r
\r
Package=<5>\r
{{{\r
\r
###############################################################################\r
\r
-Project: "sdcppa"=".\support\cpp\sdcppa.dsp" - Package Owner=<4>\r
+Project: "sdcppa"=.\support\cpp\sdcppa.dsp - Package Owner=<4>\r
\r
Package=<5>\r
{{{\r
\r
###############################################################################\r
\r
-Project: "src"=".\src\src.dsp" - Package Owner=<4>\r
+Project: "src"=.\src\src.dsp - Package Owner=<4>\r
\r
Package=<5>\r
{{{\r
\r
###############################################################################\r
\r
-Project: "xa51"=".\src\xa51\xa51.dsp" - Package Owner=<4>\r
+Project: "xa51"=.\src\xa51\xa51.dsp - Package Owner=<4>\r
\r
Package=<5>\r
{{{\r
\r
###############################################################################\r
\r
-Project: "xa51a"=".\src\xa51\xa51a.dsp" - Package Owner=<4>\r
+Project: "xa51a"=.\src\xa51\xa51a.dsp - Package Owner=<4>\r
\r
Package=<5>\r
{{{\r
\r
###############################################################################\r
\r
-Project: "yacc"=".\src\yacc.dsp" - Package Owner=<4>\r
+Project: "yacc"=.\src\yacc.dsp - Package Owner=<4>\r
\r
Package=<5>\r
{{{\r
\r
###############################################################################\r
\r
-Project: "z80"=".\src\z80\z80.dsp" - Package Owner=<4>\r
+Project: "z80"=.\src\z80\z80.dsp - Package Owner=<4>\r
\r
Package=<5>\r
{{{\r
\r
###############################################################################\r
\r
-Project: "z80a"=".\src\z80\z80a.dsp" - Package Owner=<4>\r
+Project: "z80a"=.\src\z80\z80a.dsp - Package Owner=<4>\r
\r
Package=<5>\r
{{{\r