X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=object.c;h=0b7df7ed8ecc77b1d7bb2eb1ad9ad26b6319821b;hp=7545866fd8a9f10106aad0adf726715fb0f951d4;hb=ace0b549a94110b69ec61442f825fb421b79799a;hpb=8f287ee72236774216a11a3062f9a26dc8dc66b6 diff --git a/object.c b/object.c index 7545866..0b7df7e 100644 --- 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)