Fixed problem with relocation,
added curr_token, so that parser can access token
This commit is contained in:
parent
04d3c7152c
commit
468d98750c
|
@ -101,6 +101,8 @@ extern item_t keytab[];
|
||||||
extern struct outhead outhead;
|
extern struct outhead outhead;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
extern int curr_token;
|
||||||
|
|
||||||
/* forward function declarations */
|
/* forward function declarations */
|
||||||
#ifdef ASLD
|
#ifdef ASLD
|
||||||
extern char *readident();
|
extern char *readident();
|
||||||
|
|
|
@ -64,6 +64,7 @@ yylex()
|
||||||
c = getval(c);
|
c = getval(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
curr_token = c;
|
||||||
return(c);
|
return(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -264,10 +264,11 @@ newrelo(s, n)
|
||||||
* move b,d0
|
* move b,d0
|
||||||
* b=a
|
* b=a
|
||||||
* a: .data2 0
|
* a: .data2 0
|
||||||
|
* but no relocation info if S_VAR is set, but type is S_ABS.
|
||||||
*/
|
*/
|
||||||
iscomm = s & S_COM;
|
iscomm = s & S_COM;
|
||||||
s &= ~S_COM;
|
s &= ~S_COM;
|
||||||
if ((n & RELPC) == 0 && s == S_ABS)
|
if ((n & RELPC) == 0 && ((s & ~S_VAR) == S_ABS))
|
||||||
return;
|
return;
|
||||||
if ((n & RELPC) != 0 && s == DOTTYP
|
if ((n & RELPC) != 0 && s == DOTTYP
|
||||||
#ifndef ASLD
|
#ifndef ASLD
|
||||||
|
|
Loading…
Reference in a new issue