aboutsummaryrefslogtreecommitdiff
path: root/tccelf.c
diff options
context:
space:
mode:
Diffstat (limited to 'tccelf.c')
-rw-r--r--tccelf.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/tccelf.c b/tccelf.c
index 6bde7d5..217c917 100644
--- a/tccelf.c
+++ b/tccelf.c
@@ -1042,10 +1042,9 @@ static void put_got_entry(TCCState *s1,
if (s1->dynsym) {
sym = &((ElfW(Sym) *)symtab_section->data)[sym_index];
name = (char *) symtab_section->link->data + sym->st_name;
- if (!find_elf_sym(s1->dynsym, name))
- need_plt_entry = 1;
- else
+ if (s1->sym_attrs[sym_index].has_plt_entry)
return;
+ s1->sym_attrs[sym_index].has_plt_entry = 1;
offset = sym->st_value;
#if defined(TCC_TARGET_I386) || defined(TCC_TARGET_X86_64)
if (need_plt_entry) {