From 468d98750cb86147fcb91e3c1717dc3e0387a92c Mon Sep 17 00:00:00 2001 From: ceriel Date: Mon, 8 Feb 1993 13:01:30 +0000 Subject: [PATCH] Fixed problem with relocation, added curr_token, so that parser can access token --- mach/proto/as/comm1.h | 2 ++ mach/proto/as/comm5.c | 1 + mach/proto/as/comm6.c | 3 ++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/mach/proto/as/comm1.h b/mach/proto/as/comm1.h index 2bf01a724..632c2e243 100644 --- a/mach/proto/as/comm1.h +++ b/mach/proto/as/comm1.h @@ -101,6 +101,8 @@ extern item_t keytab[]; extern struct outhead outhead; #endif +extern int curr_token; + /* forward function declarations */ #ifdef ASLD extern char *readident(); diff --git a/mach/proto/as/comm5.c b/mach/proto/as/comm5.c index 5fbd6722a..27cf23c1e 100644 --- a/mach/proto/as/comm5.c +++ b/mach/proto/as/comm5.c @@ -64,6 +64,7 @@ yylex() c = getval(c); } } + curr_token = c; return(c); } diff --git a/mach/proto/as/comm6.c b/mach/proto/as/comm6.c index 9abe6bcd7..a79251496 100644 --- a/mach/proto/as/comm6.c +++ b/mach/proto/as/comm6.c @@ -264,10 +264,11 @@ newrelo(s, n) * move b,d0 * b=a * a: .data2 0 + * but no relocation info if S_VAR is set, but type is S_ABS. */ iscomm = s & S_COM; s &= ~S_COM; - if ((n & RELPC) == 0 && s == S_ABS) + if ((n & RELPC) == 0 && ((s & ~S_VAR) == S_ABS)) return; if ((n & RELPC) != 0 && s == DOTTYP #ifndef ASLD