* src/SDCCmain.c (linkEdit): emit -z when using --debug for z80
[fw/sdcc] / src / SDCCmain.c
index 818f4fdfda80565cac6c74eaf9732aaea3712c27..346950cf0588779197e2169b9736321d334ced61 100644 (file)
@@ -1490,11 +1490,11 @@ linkEdit (char **envp)
           /* if code size specified */
           if (options.code_size)
             fprintf (lnkfile, "-w 0x%04x\n", options.code_size);
-
-          if (options.debug)
-            fprintf (lnkfile, "-z\n");
         }
 
+      if (options.debug)
+        fprintf (lnkfile, "-z\n");
+
 #define WRITE_SEG_LOC(N, L) \
   if (N) \
   { \