* src/z80/gen.c (genFunction, genEndFunction): avoided generating
authorepetrich <epetrich@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 12 Nov 2004 05:53:56 +0000 (05:53 +0000)
committerepetrich <epetrich@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 12 Nov 2004 05:53:56 +0000 (05:53 +0000)
  *_start and *_end symbols for static functions

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3573 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
src/z80/gen.c

index c3797aa5a914c7697c5568f3fa51fcf186b2d3fb..acd6c943b32ffd8dd6569955b80604b2960d995f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,10 @@
+2004-11-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
+
+       * src/z80/gen.c (genFunction, genEndFunction): avoided generating
+         *_start and *_end symbols for static functions
+
 2004-11-11 Maarten Brock <sourceforge.brock AT dse.nl>
+       
        * src/SDCCmain.c (linkEdit): don't suppress crt0 if --nostdlib is used
          and search crt0.o in all library paths,
          (setIncludePath): proper handling of --nostdinc,
index 8562c69a54ad76ed2faef643c886cec6c1c2f687..95327d250feaeca29aa002c1e56d9584dcc0d3cc 100644 (file)
@@ -3102,8 +3102,11 @@ genFunction (iCode * ic)
   
   /* Create the function header */
   emit2 ("!functionheader", sym->name);
-  sprintf (buffer, "%s_start", sym->rname);
-  emit2 ("!labeldef", buffer);
+  if (!IS_STATIC(sym->etype))
+    {
+      sprintf (buffer, "%s_start", sym->rname);
+      emit2 ("!labeldef", buffer);
+    }
   emit2 ("!functionlabeldef", sym->rname);
 
   if (options.profile) 
@@ -3296,8 +3299,11 @@ genEndFunction (iCode * ic)
       emit2 ("ret");
     }
       
-  sprintf (buffer, "%s_end", sym->rname);
-  emit2 ("!labeldef", buffer);
+  if (!IS_STATIC(sym->etype))
+    {
+      sprintf (buffer, "%s_end", sym->rname);
+      emit2 ("!labeldef", buffer);
+    }
   
   _G.flushStatics = 1;
   _G.stack.pushed = 0;