Bug 628618 part 5 - Don't set DT_REL*COUNT if it wasn't already set. r=tglek,a=sdwilsh

This commit is contained in:
Mike Hommey
2011-01-28 09:22:58 +01:00
parent 0c9e2a4789
commit a1a52c7d80
3 changed files with 11 additions and 3 deletions

View File

@@ -619,15 +619,21 @@ ElfSegment *ElfSegment::splitBefore(ElfSection *section)
return segment;
}
ElfSection *ElfDynamic_Section::getSectionForType(unsigned int tag)
ElfValue *ElfDynamic_Section::getValueForType(unsigned int tag)
{
for (unsigned int i = 0; i < shdr.sh_size / shdr.sh_entsize; i++)
if (dyns[i].tag == tag)
return dyns[i].value->getSection();
return dyns[i].value;
return NULL;
}
ElfSection *ElfDynamic_Section::getSectionForType(unsigned int tag)
{
ElfValue *value = getValueForType(tag);
return value ? value->getSection() : NULL;
}
void ElfDynamic_Section::setValueForType(unsigned int tag, ElfValue *val)
{
unsigned int i;