Ooops --- only emit an error in pass 2 or 3, or else we can't handle forward dtrg-pcc
authorDavid Given <dg@cowlark.com>
Wed, 7 Sep 2016 21:09:24 +0000 (23:09 +0200)
committerDavid Given <dg@cowlark.com>
Wed, 7 Sep 2016 21:09:24 +0000 (23:09 +0200)
references.

--HG--
branch : default-branch

mach/arm/as/mach5.c

index 73f5067..d55beaa 100644 (file)
@@ -210,7 +210,10 @@ void strldr(uint32_t opc, struct expr_t* expr)
                serror("displacement to near constant is too big");
        }
 
-       serror("cannot directly address symbols in another section");
+       if (pass == PASS_1)
+               DOTVAL += 4; /* Worst case we can emit */
+       else
+               serror("cannot directly address symbols in another section");
 }
 
 word_t calcshft(valu_t val, short typ, word_t styp)