aboutsummaryrefslogtreecommitdiff
path: root/libtcc.c
diff options
context:
space:
mode:
authorThomas Preud'homme <thomas.preudhomme@celest.fr>2011-02-07 22:42:38 +0100
committerThomas Preud'homme <thomas.preudhomme@celest.fr>2011-02-09 00:12:57 +0100
commit32a682b88febf983420406a4ec5087d07761a8bc (patch)
treebf858a09960621b95560390109ab22bdf40b71f0 /libtcc.c
parentc23400278ad7a1a44cb9b469c4635ea29cb12b25 (diff)
downloadtinycc-32a682b88febf983420406a4ec5087d07761a8bc.tar.gz
tinycc-32a682b88febf983420406a4ec5087d07761a8bc.tar.bz2
Fix fct asm label: only valid for declaration
- Fix function assembly label mechanism introduced in commit 9b09fc376e8c212a767c875e71ca003e3b9a0d2e to only accept alternative name for function declaration. - merge the code with the one introduced in commit 264a103610e3ee86b27b8cbb0e4ec81cd654d980. - Don't memorize token for asm label but directly the asm label.
Diffstat (limited to 'libtcc.c')
-rw-r--r--libtcc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libtcc.c b/libtcc.c
index 64e5519..613374e 100644
--- a/libtcc.c
+++ b/libtcc.c
@@ -436,10 +436,7 @@ ST_FUNC void put_extern_sym2(Sym *sym, Section *section,
}
if (!sym->c) {
- if (sym->a)
- name = get_tok_str(sym->a, NULL);
- else
- name = get_tok_str(sym->v, NULL);
+ name = get_tok_str(sym->v, NULL);
#ifdef CONFIG_TCC_BCHECK
if (tcc_state->do_bounds_check) {
char buf[32];
@@ -496,6 +493,9 @@ ST_FUNC void put_extern_sym2(Sym *sym, Section *section,
pstrcpy(buf1 + 1, sizeof(buf1) - 1, name);
name = buf1;
}
+ if (sym->asm_label) {
+ name = sym->asm_label;
+ }
info = ELFW(ST_INFO)(sym_bind, sym_type);
sym->c = add_elf_sym(symtab_section, value, size, info, other, sh_num, name);
} else {