зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1542958 - fix code section adjustments in elfhack; r=glandium
We were never adjusting `last` in this loop, so we were computing the wrong addresses for all sections beyond the first. Which in turn meant that we would compute the wrong size for the section data we needed to allocate. Differential Revision: https://phabricator.services.mozilla.com/D28195 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
63c8f7ae98
Коммит
3b7164be54
|
@ -177,6 +177,7 @@ class ElfRelHackCode_Section : public ElfSection {
|
|||
// alignment required by code sections.
|
||||
if (shdr.sh_addralign < (*c)->getAddrAlign())
|
||||
shdr.sh_addralign = (*c)->getAddrAlign();
|
||||
last = *c;
|
||||
}
|
||||
shdr.sh_size = code.back()->getAddr() + code.back()->getSize();
|
||||
data = static_cast<char *>(malloc(shdr.sh_size));
|
||||
|
|
Загрузка…
Ссылка в новой задаче