From 4d892a7993c88c833adc24135c20f5061135a11c Mon Sep 17 00:00:00 2001 From: cuz Date: Sun, 5 Jan 2003 21:04:40 +0000 Subject: [PATCH] Fixed a bug git-svn-id: svn://svn.cc65.org/cc65/trunk@1888 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/ld65/config.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ld65/config.c b/src/ld65/config.c index cd9da9952..c10b5f7dc 100644 --- a/src/ld65/config.c +++ b/src/ld65/config.c @@ -738,10 +738,11 @@ static void ParseSegments (void) S->Align = 0; } - /* If the segment is marked as BSS style, check that there's no - * initialized data in the segment. + /* If the segment is marked as BSS style, and if the segment exists + * in any of the object file, check that there's no initialized data + * in the segment. */ - if ((S->Flags & SF_BSS) != 0 && !IsBSSType (S->Seg)) { + if ((S->Flags & SF_BSS) != 0 && S->Seg != 0 && !IsBSSType (S->Seg)) { Warning ("%s(%u): Segment with type `bss' contains initialized data", CfgGetName (), CfgErrorLine); }