diff options
author | Domen Kožar <domen@dev.si> | 2020-06-03 13:34:06 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-03 13:34:06 (GMT) |
commit | 12e2b7b813c3b8c9f18399fbffa0337c688ab09e (patch) | |
tree | 2940026f21f3e934f805834b85945b19a928784e | |
parent | 12e462204c1923deef23d0bb1f2b0a98ac6f7b1f (diff) | |
parent | 1cc234fea5600190d872329aca60e2365cefc39e (diff) | |
download | patchelf-12e2b7b813c3b8c9f18399fbffa0337c688ab09e.zip patchelf-12e2b7b813c3b8c9f18399fbffa0337c688ab09e.tar.gz patchelf-12e2b7b813c3b8c9f18399fbffa0337c688ab09e.tar.bz2 |
Merge pull request #127 from bartosh/master
fix adjusting startPage
-rw-r--r-- | src/patchelf.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/patchelf.cc b/src/patchelf.cc index 80d40ab..cbf420d 100644 --- a/src/patchelf.cc +++ b/src/patchelf.cc @@ -746,10 +746,8 @@ void ElfFile<ElfFileParamNames>::rewriteSectionsLibrary() since DYN executables tend to start at virtual address 0, so rewriteSectionsExecutable() won't work because it doesn't have any virtual address space to grow downwards into. */ - if (isExecutable) { - if (startOffset >= startPage) { - debug("shifting new PT_LOAD segment by %d bytes to work around a Linux kernel bug\n", startOffset - startPage); - } + if (isExecutable && startOffset > startPage) { + debug("shifting new PT_LOAD segment by %d bytes to work around a Linux kernel bug\n", startOffset - startPage); startPage = startOffset; } |