From e046ecbcf20fba1757c19ddab35401608cae884d Mon Sep 17 00:00:00 2001 From: uz Date: Sun, 1 Aug 2010 13:52:06 +0000 Subject: [PATCH] Be sure to generate line info for all segments. git-svn-id: svn://svn.cc65.org/cc65/trunk@4778 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/ld65/bin.c | 4 +++- src/ld65/o65.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ld65/bin.c b/src/ld65/bin.c index 7d3f15c37..c5386114a 100644 --- a/src/ld65/bin.c +++ b/src/ld65/bin.c @@ -200,6 +200,9 @@ static void BinWriteMem (BinDesc* D, Memory* M) Addr = NewAddr; } + /* Relocate line information for this segment */ + RelocLineInfo (S->Seg); + } else if (S->Load == M) { /* Handle ALIGN_LOAD */ @@ -221,7 +224,6 @@ static void BinWriteMem (BinDesc* D, Memory* M) */ if (DoWrite) { unsigned long P = ftell (D->F); - RelocLineInfo (S->Seg); S->Seg->FillVal = M->FillVal; SegWrite (D->F, S->Seg, BinWriteExpr, D); PrintNumVal ("Wrote", (unsigned long) (ftell (D->F) - P)); diff --git a/src/ld65/o65.c b/src/ld65/o65.c index 6f31909e4..87d3bc7d6 100644 --- a/src/ld65/o65.c +++ b/src/ld65/o65.c @@ -783,12 +783,14 @@ static void O65WriteSeg (O65Desc* D, SegDesc** Seg, unsigned Count, int DoWrite) /* Get the segment from the list node */ S = Seg [I]; + /* Relocate line info for this segment */ + RelocLineInfo (S->Seg); + /* Keep the user happy */ Print (stdout, 1, " Writing `%s'\n", GetString (S->Name)); /* Write this segment */ if (DoWrite) { - RelocLineInfo (S->Seg); SegWrite (D->F, S->Seg, O65WriteExpr, D); } -- 2.39.5