History

tccelf: accept BSS symbol with same name from other module

... such as 'int baz;' in two files at the same time

grischka committed 17 years ago

Commit bba515a1 parent e7297581 file · +2 −1Browse files

Unified · Split

tccelf.c+2−1
@@ -233,7 +233,8 @@ static int add_elf_sym(Section *s, unsigned long value, unsigned long size, · 232 unmodified lines
233 /* weak is ignored if already global */233 /* weak is ignored if already global */
234 } else if (sym_vis == STV_HIDDEN || sym_vis == STV_INTERNAL) {234 } else if (sym_vis == STV_HIDDEN || sym_vis == STV_INTERNAL) {
235 /* ignore hidden symbols after */235 /* ignore hidden symbols after */
236 } else if (esym->st_shndx == SHN_COMMON && sh_num < SHN_LORESERVE) {236 } else if (esym->st_shndx == SHN_COMMON
237 && (sh_num < SHN_LORESERVE || sh_num == SHN_COMMON)) {
237 /* gr: Happens with 'tcc ... -static tcctest.c' on e.g. Ubuntu 6.01238 /* gr: Happens with 'tcc ... -static tcctest.c' on e.g. Ubuntu 6.01
238 No idea if this is the correct solution ... */239 No idea if this is the correct solution ... */
239 goto do_patch;240 goto do_patch;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t