From dfed9babfcce075cdfd388fe7646d183e3f5505f Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Sat, 10 Dec 2016 19:09:44 +0800 Subject: [PATCH] Allow PLT/GOT entry for weak static symbol --- tccelf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tccelf.c b/tccelf.c index df7375c8..41b60816 100644 --- a/tccelf.c +++ b/tccelf.c @@ -1009,6 +1009,7 @@ static unsigned long put_got_entry(TCCState *s1, int dyn_reloc_type, esym->st_value = offset; } else if (s1->output_type == TCC_OUTPUT_MEMORY || + ELFW(ST_BIND)(sym->st_info) == STB_WEAK || relocs_info[reloc_type].gotplt_entry == ALWAYS_GOTPLT_ENTRY) index = put_elf_sym(s1->dynsym, offset, size, info, 0, sym->st_shndx, name);