History

tccelf: allow multiply defined weak symbols

Joe Soroka committed 15 years ago

Commit 585027a1 parent e23194a1 file · +2 −0Browse files

Unified · Split

tccelf.c+2−0
@@ -241,6 +241,8 @@ ST_FUNC int add_elf_sym(Section *s, uplong value, unsigned long size, · 240 unmodified lines
241 goto do_patch;241 goto do_patch;
242 } else if (sym_bind == STB_WEAK && esym_bind == STB_GLOBAL) {242 } else if (sym_bind == STB_WEAK && esym_bind == STB_GLOBAL) {
243 /* weak is ignored if already global */243 /* weak is ignored if already global */
244 } else if (sym_bind == STB_WEAK && esym_bind == STB_WEAK) {
245 /* keep first-found weak definition, ignore subsequents */
244 } else if (sym_vis == STV_HIDDEN || sym_vis == STV_INTERNAL) {246 } else if (sym_vis == STV_HIDDEN || sym_vis == STV_INTERNAL) {
245 /* ignore hidden symbols after */247 /* ignore hidden symbols after */
246 } else if (esym->st_shndx == SHN_COMMON248 } else if (esym->st_shndx == SHN_COMMON