From bdea2b175301d70788bfa4e9b685dc0f23ac6f13 Mon Sep 17 00:00:00 2001 From: David Given Date: Wed, 7 Sep 2016 23:09:24 +0200 Subject: [PATCH] Ooops --- only emit an error in pass 2 or 3, or else we can't handle forward references. --HG-- branch : default-branch --- mach/arm/as/mach5.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mach/arm/as/mach5.c b/mach/arm/as/mach5.c index 73f506784..d55beaa6b 100644 --- a/mach/arm/as/mach5.c +++ b/mach/arm/as/mach5.c @@ -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) -- 2.34.1