diff options
| author | Thomas Preud'homme <thomas.preudhomme@celest.fr> | 2010-09-05 22:39:34 +0200 |
|---|---|---|
| committer | Thomas Preud'homme <thomas.preudhomme@celest.fr> | 2010-09-10 20:15:03 +0200 |
| commit | 9b09fc376e8c212a767c875e71ca003e3b9a0d2e (patch) | |
| tree | b02d6544e1eeca1e9b878d120115bb1377c2291f /libtcc.c | |
| parent | a7fb00e887a2ef9372040a75c3d37b79971d9b21 (diff) | |
| download | tinycc-9b09fc376e8c212a767c875e71ca003e3b9a0d2e.tar.gz tinycc-9b09fc376e8c212a767c875e71ca003e3b9a0d2e.tar.bz2 | |
Add support of asm label for functions.
Add support for asm labels for functions, that is the ability to rename
a function at assembly level with __asm__ ("newname") appended in
function declaration.
Diffstat (limited to 'libtcc.c')
| -rw-r--r-- | libtcc.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -72,6 +72,12 @@ ST_DATA void *rt_prog_main; #endif /* ALL_IN_ONE */ /********************************************************/ +#ifndef CONFIG_TCC_ASM_LABEL +ST_FUNC void asm_label_instr(CString *) +{ + error("inline asm() not supported"); +} +#endif #ifndef CONFIG_TCC_ASM ST_FUNC void asm_instr(void) { @@ -436,7 +442,10 @@ ST_FUNC void put_extern_sym2(Sym *sym, Section *section, } if (!sym->c) { - name = get_tok_str(sym->v, NULL); + if (sym->a) + name = get_tok_str(sym->a, NULL); + else + name = get_tok_str(sym->v, NULL); #ifdef CONFIG_TCC_BCHECK if (tcc_state->do_bounds_check) { char buf[32]; |
