aboutsummaryrefslogtreecommitdiff
path: root/tccasm.c
diff options
context:
space:
mode:
Diffstat (limited to 'tccasm.c')
-rw-r--r--tccasm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tccasm.c b/tccasm.c
index 1064ea6..8c62987 100644
--- a/tccasm.c
+++ b/tccasm.c
@@ -481,6 +481,8 @@ static void asm_parse_directive(TCCState *s1)
break;
case TOK_ASM_globl:
case TOK_ASM_global:
+ case TOK_ASM_weak:
+ tok1 = tok;
do {
Sym *sym;
@@ -491,6 +493,8 @@ static void asm_parse_directive(TCCState *s1)
sym->type.t = VT_VOID;
}
sym->type.t &= ~VT_STATIC;
+ if (tok1 == TOK_ASM_weak)
+ sym->type.t |= VT_WEAK;
next();
} while (tok == ',');
break;