diff --git a/output_chunks.cc b/output_chunks.cc index f6b4e5ed..edfbeeed 100644 --- a/output_chunks.cc +++ b/output_chunks.cc @@ -453,7 +453,9 @@ void GotSection::add_got_symbol(Symbol *sym) { sym->got_idx = shdr.sh_size / GOT_SIZE; shdr.sh_size += GOT_SIZE; got_syms.push_back(sym); - out::dynsym->add_symbol(sym); + + if (sym->is_imported) + out::dynsym->add_symbol(sym); } void GotSection::add_gottpoff_symbol(Symbol *sym) {