tccelf: allow multiply defined weak symbols

master
Joe Soroka 2011-03-07 12:18:54 -08:00
parent e23194a1fa
commit 585027aa96
1 changed files with 2 additions and 0 deletions

View File

@ -241,6 +241,8 @@ ST_FUNC int add_elf_sym(Section *s, uplong value, unsigned long size,
goto do_patch;
} else if (sym_bind == STB_WEAK && esym_bind == STB_GLOBAL) {
/* weak is ignored if already global */
} else if (sym_bind == STB_WEAK && esym_bind == STB_WEAK) {
/* keep first-found weak definition, ignore subsequents */
} else if (sym_vis == STV_HIDDEN || sym_vis == STV_INTERNAL) {
/* ignore hidden symbols after */
} else if (esym->st_shndx == SHN_COMMON