зеркало из https://github.com/mozilla/gecko-dev.git
Bug 628618 part 1 - Support ElfLocations without a corresponding ElfSection. r=tglek,a=sdwilsh
This commit is contained in:
Родитель
39d067f58f
Коммит
f08ea08f1a
|
@ -568,11 +568,11 @@ inline unsigned int Elf::getSize() {
|
|||
|
||||
inline ElfLocation::ElfLocation(unsigned int location, Elf *elf) {
|
||||
section = elf->getSectionAt(location);
|
||||
offset = location - section->getAddr();
|
||||
offset = location - (section ? section->getAddr() : 0);
|
||||
}
|
||||
|
||||
inline unsigned int ElfLocation::getValue() {
|
||||
return section->getAddr() + offset;
|
||||
return (section ? section->getAddr() : 0) + offset;
|
||||
}
|
||||
|
||||
inline unsigned int ElfSize::getValue() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче