projects
/
fw
/
sdcc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* src/SDCCsymt.c (initCSupport): fix compile warning on Cygwin
[fw/sdcc]
/
as
/
mcs51
/
lkrloc.c
diff --git
a/as/mcs51/lkrloc.c
b/as/mcs51/lkrloc.c
index 7a9dbcfb9dc05c6c2f3a4edaa8e150aa2377f6fa..52654d59f407b6ef69a5ebc444f0c96beda4a14f 100644
(file)
--- a/
as/mcs51/lkrloc.c
+++ b/
as/mcs51/lkrloc.c
@@
-16,9
+16,6
@@
#include <stdio.h>
#include <string.h>
#include <stdio.h>
#include <string.h>
-//#if !defined(_MSC_VER)
-//#include <alloc.h>
-//#endif
#include "aslink.h"
/*)Module lkrloc.c
#include "aslink.h"
/*)Module lkrloc.c
@@
-54,6
+51,11
@@
*/
int lastExtendedAddress=-1;
*/
int lastExtendedAddress=-1;
+/* Static variable which holds the index of last processed area.
+ * Useful only for iHex mode.
+ */
+static int lastAreaIndex = -1;
+
/*)Function VOID reloc(c)
*
* char c process code
/*)Function VOID reloc(c)
*
* char c process code
@@
-531,7
+533,13
@@
relr()
* This is another reason why we can't have areas greater
* than 64K yet, even in flat24 mode.
*/
* This is another reason why we can't have areas greater
* than 64K yet, even in flat24 mode.
*/
- extendedAddress += ((a[aindex]->a_size) >> 16 & 0xffff);
+ // extendedAddress += ((a[aindex]->a_size) >> 16 & 0xffff);
+ // commented out by jr
+
+ if (lastAreaIndex != aindex) {
+ lastAreaIndex = aindex;
+ newArea();
+ }
if (extendedAddress != lastExtendedAddress)
{
if (extendedAddress != lastExtendedAddress)
{