Accept more asm expressions

In particular subtracting a defined symbol from current section
makes the value PC relative, and .org accepts symbolic expressions
as well, if the symbol is from the current section.
This commit is contained in:
Michael Matz
2016-06-29 15:57:32 +02:00
parent c82e52d55b
commit 8e4da42384
4 changed files with 60 additions and 23 deletions

1
tcc.h
View File

@ -555,6 +555,7 @@ typedef struct CachedInclude {
typedef struct ExprValue {
uint64_t v;
Sym *sym;
int pcrel;
} ExprValue;
#define MAX_ASM_OPERANDS 30