From: vrokas Date: Fri, 23 Jul 2004 13:45:51 +0000 (+0000) Subject: * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=64805ee8f8edb6a088d4c8c4e3af655e8bb8dd9c;p=fw%2Fsdcc * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files without source code but only variable initializers git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3389 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/ChangeLog b/ChangeLog index 18e006c4..f69ee82b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-07-23 Vangelis Rokas + + * src/pic16/glue.c (pic16emitStaticSeg): fixed bug with files + without source code but only variable initializers + 2004-07-20 Vangelis Rokas * src/pic16/glue.c (pic16emitRegularMap): unused functions marked as diff --git a/src/pic16/glue.c b/src/pic16/glue.c index f59f1536..3921c2cb 100644 --- a/src/pic16/glue.c +++ b/src/pic16/glue.c @@ -1271,6 +1271,9 @@ CODESPACE: %d\tCONST: %d\tPTRCONST: %d\tSPEC_CONST: %d\n", __FUNCTION__, pb = pic16_newpCodeChain(NULL, 'P',pic16_newpCodeCharP("; Starting pCode block for Ival")); pic16_addpBlock(pb); + /* make sure that 'code' directive is emitted before */ + pic16_addpCode2pBlock(pb, pic16_newpCodeAsmDir("code", NULL)); + // fprintf(stderr, "%s:%d [2] generating init for label: %s\n", __FILE__, __LINE__, sym->rname); pic16_addpCode2pBlock(pb,pic16_newpCodeLabel(sym->rname,-1));