summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/patchelf.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/patchelf.cc b/src/patchelf.cc
index 55b38e3..a9696e4 100644
--- a/src/patchelf.cc
+++ b/src/patchelf.cc
@@ -135,7 +135,10 @@ private:
ElfFile * elfFile;
bool operator ()(const Elf_Phdr & x, const Elf_Phdr & y)
{
- if (x.p_type == PT_PHDR) return true;
+ if (x.p_type == PT_PHDR) {
+ if (y.p_type == PT_PHDR) return false;
+ return true;
+ }
if (y.p_type == PT_PHDR) return false;
return elfFile->rdi(x.p_paddr) < elfFile->rdi(y.p_paddr);
}