aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tccasm.c18
-rw-r--r--tcctok.h1
2 files changed, 19 insertions, 0 deletions
diff --git a/tccasm.c b/tccasm.c
index d2997a4..5702556 100644
--- a/tccasm.c
+++ b/tccasm.c
@@ -537,6 +537,24 @@ static void asm_parse_directive(TCCState *s1)
use_section(s1, sname);
}
break;
+ case TOK_ASM_file:
+ {
+ char filename[512];
+
+ filename[0] = '\0';
+ next();
+
+ if (tok == TOK_STR)
+ pstrcat(filename, sizeof(filename), tokc.cstr->data);
+ else
+ pstrcat(filename, sizeof(filename), get_tok_str(tok, NULL));
+
+ if (s1->warn_unsupported)
+ warning("ignoring .file %s", filename);
+
+ next();
+ }
+ break;
case TOK_SECTION1:
{
char sname[256];
diff --git a/tcctok.h b/tcctok.h
index a69f6f9..f512871 100644
--- a/tcctok.h
+++ b/tcctok.h
@@ -249,6 +249,7 @@
DEF_ASM(string)
DEF_ASM(asciz)
DEF_ASM(ascii)
+ DEF_ASM(file)
DEF_ASM(globl)
DEF_ASM(global)
DEF_ASM(text)