]> git.gag.com Git - fw/sdcc/commitdiff
* src/SDCCmain.c (linkEdit): fixed bug 1195202
authorborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 13 May 2005 20:46:41 +0000 (20:46 +0000)
committerborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 13 May 2005 20:46:41 +0000 (20:46 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3755 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
src/SDCCmain.c

index d98849befb809969d927d57cbc1dd02141962bce..126396f2b22525a7acf7757fa2907fcdef9c597d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2005-05-13 Borut Razem <borut.razem AT siol.net>
+
+       * src/SDCCmain.c (linkEdit): fixed bug 1195202
+
 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
 
        * .version: changed to version 2.5.1; back to bleeding edge development
index acd3abcf2b1abdfe66d1dc72fb8cb066a2261633..55338496184b6eee7e4be80eee4abfedbbe1cd8b 100644 (file)
@@ -1425,6 +1425,7 @@ linkEdit (char **envp)
   char *segName, *c;
   int system_ret;
   const char *s;
+  char linkerScriptFileName[PATH_MAX];
 
 
   if(port->linker.needLinkerScript)
@@ -1447,11 +1448,11 @@ linkEdit (char **envp)
         }
 
       /* first we need to create the <filename>.lnk file */
-      SNPRINTF (scratchFileName, sizeof(scratchFileName),
+      SNPRINTF (linkerScriptFileName, sizeof(scratchFileName),
         "%s.lnk", dstFileName);
-      if (!(lnkfile = fopen (scratchFileName, "w")))
+      if (!(lnkfile = fopen (linkerScriptFileName, "w")))
         {
-          werror (E_FILE_OPEN_ERR, scratchFileName);
+          werror (E_FILE_OPEN_ERR, linkerScriptFileName);
           exit (1);
         }
 
@@ -1753,7 +1754,7 @@ linkEdit (char **envp)
       char buffer3[PATH_MAX];
       set *tempSet=NULL, *libSet=NULL;
 
-      strcpy(buffer3, dstFileName);
+      strcpy(buffer3, linkerScriptFileName);
       if(TARGET_IS_PIC16) {
 
          /* use $l to set the linker include directories */