Bug 628618 part 2 - PT_DYNAMIC segment only contains SHT_DYNAMIC section. r=tglek,a=sdwilsh

This commit is contained in:
Mike Hommey 2011-01-28 09:22:58 +01:00
parent f08ea08f1a
commit 89b4d7733f

View File

@ -428,6 +428,10 @@ public:
// This may be biased, but should work in most cases
if ((section->getFlags() & SHF_ALLOC) == 0)
return false;
// Special case for PT_DYNAMIC. Eventually, this should
// be better handled than special cases
if ((p_type == PT_DYNAMIC) && (section->getType() != SHT_DYNAMIC))
return false;
return (addr >= p_vaddr) &&
(addr + size <= p_vaddr + p_memsz);