realpath() is not available for mingw32. Use _fullpath instead.
[fw/sdcc] / as / mcs51 / lkaomf51.c
index 69878c052d3a20ca1742bea125bc8f2c25887380..fa009e7732d9ed71c379249e7889eccb2f7f706a 100644 (file)
@@ -26,7 +26,7 @@
 
 #define EQ(A,B) !strcmp((A),(B))
 #define MEMSIZE 0x10000
-#define DODUMP 1
+//#define DODUMP 1
 
 typedef struct
 {
@@ -378,6 +378,7 @@ void OutputAOEMF51(void)
 
                                /*Content Record*/
                                OutputByte(0x06);/*REC TYPE*/
+                               if(procedure[k].EndAdd==-1) procedure[k].EndAdd=HexSize;
                                recsize=procedure[k].EndAdd-procedure[k].BeginAdd+1+4;
                                OutputWord(recsize);/*Record Length*/
                                OutputByte(0x00);/*SEG ID*/
@@ -634,6 +635,7 @@ void CollectInfoFromCDB(void)
                                        {
                                                case 'C': /*Code*/ 
                                                case 'D': /*Code/static segment*/ 
+                                               case 'Z': /*Functions and undefined code space*/ 
                                                        symbol[numsym].UsageType=0x40;
                                                break;
 
@@ -659,7 +661,7 @@ void CollectInfoFromCDB(void)
                                                break;
                                                
                                                default:
-                                                       printf("Name: %s, AddressSpace:%c\n", symbol[numsym].name, AddressSpace);
+                                                       printf("Unknown scope information for: %s, AddressSpace:%c\n", symbol[numsym].name, AddressSpace);
                                                break;
                                        }
                                        numsym++;