* support/valdiag/valdiag.py: added -DPORT_HOST=1
[fw/sdcc] / as / hc08 / lkelf.c
index d024770b55ad839ca52bf6b5a79851b55be4a091..3cc602fd483de07718419311c0c42af01075ddd5 100644 (file)
 #include <string.h>
 #include <stdlib.h>
 #include "aslink.h"
-#include "sdccconf.h"
+
+#ifdef _WIN32
+#  ifdef __MINGW32__ /* GCC MINGW32 depends on configure */
+#    include "sdccconf.h"
+#  else
+#    include "sdcc_vc.h"
+#  endif
+#else /* Assume Un*x style system */
+#  include "sdccconf.h"
+#endif
 
 static int execStartMSB;
 static int execStartLSB;
@@ -744,7 +753,7 @@ elf (int i)
         }
 
       /* Copy the data into the image buffer */
-      for (i = 2; i < rtcnt ; i++, address++)
+      for (i = 2; i < rtcnt ; i++)
         {
           if (rtflg[i])
             {
@@ -766,6 +775,7 @@ elf (int i)
                       execStartLSBfound = 1;
                     }
                 }
+             address++;
             }
         }
     }