Bug 671188 - Don't fail on R_*_NONE relocations with an empty r_offset. r=tglek

This commit is contained in:
Mike Hommey 2011-07-15 10:15:28 +02:00
Родитель 406ac0809f
Коммит 9726993d7f
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -416,6 +416,9 @@ int do_relocation_section(Elf *elf, unsigned int rel_type, unsigned int rel_type
int entry_sz = (elf->getClass() == ELFCLASS32) ? 4 : 8;
for (typename std::vector<Rel_Type>::iterator i = section->rels.begin();
i != section->rels.end(); i++) {
// We don't need to keep R_*_NONE relocations
if (!ELF32_R_TYPE(i->r_info))
continue;
ElfSection *section = elf->getSectionAt(i->r_offset);
// __cxa_pure_virtual is a function used in vtables to point at pure
// virtual methods. The __cxa_pure_virtual function usually abort()s.