tccasm: support .weak labels

This commit is contained in:
Joe Soroka
2011-02-01 08:43:54 -08:00
parent 4d5105c8f1
commit c59d3426b8
2 changed files with 5 additions and 0 deletions

View File

@ -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;