Error out in put_got_entry if no dynamic symbol

This commit is contained in:
Thomas Preud'homme 2016-12-05 21:00:35 +00:00
parent dfed9babfc
commit 11747fe5d0

View File

@ -1013,6 +1013,8 @@ static unsigned long put_got_entry(TCCState *s1, int dyn_reloc_type,
relocs_info[reloc_type].gotplt_entry == ALWAYS_GOTPLT_ENTRY)
index = put_elf_sym(s1->dynsym, offset, size, info, 0,
sym->st_shndx, name);
else
tcc_error("Runtime relocation without dynamic symbol: %s", name);
put_elf_reloc(s1->dynsym, s1->got, got_offset, dyn_reloc_type, index);
} else
put_elf_reloc(symtab_section, s1->got, got_offset, dyn_reloc_type,