aboutsummaryrefslogtreecommitdiff
path: root/tccgen.c
diff options
context:
space:
mode:
authorJoe Soroka <gits@joesoroka.com>2011-03-07 00:25:27 -0800
committerJoe Soroka <gits@joesoroka.com>2011-03-07 00:25:27 -0800
commit0f0c2d9c02d357c247f7310908124c39b8625d35 (patch)
tree66b499cd032abe24607dd078ae94a8d5457ef91c /tccgen.c
parent38cbb40e904f3113ae117278fbbcda0f71f18c92 (diff)
downloadtinycc-0f0c2d9c02d357c247f7310908124c39b8625d35.tar.gz
tinycc-0f0c2d9c02d357c247f7310908124c39b8625d35.tar.bz2
weak redefinition of a symbol should weaken the original
Diffstat (limited to 'tccgen.c')
-rw-r--r--tccgen.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tccgen.c b/tccgen.c
index da39d36..0c3b50f 100644
--- a/tccgen.c
+++ b/tccgen.c
@@ -5592,6 +5592,9 @@ ST_FUNC void decl(int l)
extern */
sym = external_sym(v, &type, r, asm_label);
+ if (type.t & VT_WEAK)
+ sym->type.t |= VT_WEAK;
+
if (ad.alias_target) {
Section tsec;
Elf32_Sym *esym;