forked from mirrors/gecko-dev
Bug 1863485 - Properly update section headers when swapping .rel.plt and .relr.dyn of the same size. r=firefox-build-system-reviewers,sergesanspaille
When .rel.plt and .relr.dyn are the same size, after the section header for .relr.dyn has been updated, it matches the condition for .rel.plt, and we ended up undoing the change. Differential Revision: https://phabricator.services.mozilla.com/D192981
This commit is contained in:
parent
820da1024f
commit
52c87462c7
1 changed files with 4 additions and 4 deletions
|
|
@ -339,10 +339,10 @@ bool RelR<bits>::hack(std::fstream& f) {
|
|||
s.sh_addr = dyn_info[DT_RELR];
|
||||
}
|
||||
write_one_at(f, shdr_offset, s);
|
||||
}
|
||||
} else if (jmprel && (s.sh_addr == jmprel) &&
|
||||
(s.sh_addr != dyn_info[DT_JMPREL])) {
|
||||
// If DT_JMPREL has been adjusted to swap with DT_RELR, also adjust
|
||||
// the corresponding section header.
|
||||
if (jmprel && (s.sh_addr == jmprel) && (s.sh_addr != dyn_info[DT_JMPREL])) {
|
||||
s.sh_offset -= s.sh_addr - dyn_info[DT_JMPREL];
|
||||
s.sh_addr = dyn_info[DT_JMPREL];
|
||||
write_one_at(f, shdr_offset, s);
|
||||
|
|
|
|||
Loading…
Reference in a new issue