tccelf: accept BSS symbol with same name from other module
... such as 'int baz;' in two files at the same time
This commit is contained in:
parent
e7297581fc
commit
bba515afe5
1 changed files with 2 additions and 1 deletions
3
tccelf.c
3
tccelf.c
|
@ -233,7 +233,8 @@ static int add_elf_sym(Section *s, unsigned long value, unsigned long size,
|
|||
/* weak is ignored if already global */
|
||||
} else if (sym_vis == STV_HIDDEN || sym_vis == STV_INTERNAL) {
|
||||
/* ignore hidden symbols after */
|
||||
} else if (esym->st_shndx == SHN_COMMON && sh_num < SHN_LORESERVE) {
|
||||
} else if (esym->st_shndx == SHN_COMMON
|
||||
&& (sh_num < SHN_LORESERVE || sh_num == SHN_COMMON)) {
|
||||
/* gr: Happens with 'tcc ... -static tcctest.c' on e.g. Ubuntu 6.01
|
||||
No idea if this is the correct solution ... */
|
||||
goto do_patch;
|
||||
|
|
Loading…
Reference in a new issue