There was an error while loading. Please reload this page.
1 parent 955a921 commit c994da9Copy full SHA for c994da9
elf.cc
@@ -150,7 +150,7 @@ Object::getSegmentForAddress(Off a) const
150
151
auto pos = std::lower_bound(hdrs.begin(), hdrs.end(), a,
152
[] (const Elf::Phdr &header, Elf::Off addr) {
153
- return header.p_vaddr + header.p_memsz < addr; });
+ return header.p_vaddr + header.p_memsz <= addr; });
154
if (pos != hdrs.end() && pos->p_vaddr <= a) {
155
lastSegmentForAddress = &*pos;
156
return lastSegmentForAddress;
0 commit comments