]> Shamusworld >> Repos - rmac/commitdiff
Supplementary fix for bug #140. Apparently bf4dbb2860116dd1d0fd934b28a16f9eb15cd7fd...
authorggn <ggn.dbug@gmail.com>
Sun, 1 Mar 2020 20:24:50 +0000 (22:24 +0200)
committerShamus Hammons <jlhamm@acm.org>
Mon, 2 Mar 2020 14:03:28 +0000 (08:03 -0600)
maketabs.bat
object.c

index 0d993c016d9d703b511406b13f569d6f9ea4a5a4..c5947a9c4ec03a55fe18c73847b42bb550124107 100644 (file)
@@ -25,7 +25,7 @@ if not exist %FILE2% GOTO BUILD
 for /F %%i IN ('dir /b /OD %FILE1% %FILE2% ^| more +1') DO SET NEWEST=%%i
 if %NEWEST%==%FILE1% GOTO BUILD
 
-SET FILE1=dsp56k.tab
+SET FILE1=dsp56k.mch
 SET FILE2=dsp56ktab.h
 if not exist %FILE2% GOTO BUILD
 for /F %%i IN ('dir /b /OD %FILE1% %FILE2% ^| more +1') DO SET NEWEST=%%i
index 7545866fd8a9f10106aad0adf726715fb0f951d4..0b7df7ed8ecc77b1d7bb2eb1ad9ad26b6319821b 100644 (file)
--- a/object.c
+++ b/object.c
@@ -173,14 +173,16 @@ uint8_t * AddBSDSymEntry(uint8_t * buf, SYM * sym, int globflag)
        {
                z = 0x02000000;                                 // Set equated flag
        }
-       else
+
+       // If a symbol is both EQUd and flagged as TBD then we let
+       // the later take precedence. Otherwise the linker will not even
+       // bother trying to relocate the address during link time
+
+       switch (w1 & TDB)
        {
-               switch (w1 & TDB)
-               {
-               case TEXT: z = 0x04000000; break;       // Set TEXT segment flag
-               case DATA: z = 0x06000000; break;       // Set DATA segment flag
-               case BSS : z = 0x08000000; break;       // Set BSS segment flag
-               }
+       case TEXT: z = 0x04000000; break;       // Set TEXT segment flag
+       case DATA: z = 0x06000000; break;       // Set DATA segment flag
+       case BSS : z = 0x08000000; break;       // Set BSS segment flag
        }
 
        if (globflag)