From a935c61e74d6aa5003d82b01cffa2499498c8607 Mon Sep 17 00:00:00 2001 From: Rolf Eike Beer Date: Fri, 4 Sep 2020 10:28:21 +0200 Subject: only one section name can match --- src/patchelf.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/patchelf.cc b/src/patchelf.cc index dfae253..cd3725b 100644 --- a/src/patchelf.cc +++ b/src/patchelf.cc @@ -710,7 +710,7 @@ void ElfFile::writeReplacedSections(Elf_Off & curOff, /* If this is the .dynamic section, then the PT_DYNAMIC segment must be sync'ed with it. */ - if (sectionName == ".dynamic") { + else if (sectionName == ".dynamic") { for (auto & phdr : phdrs) { if (rdi(phdr.p_type) == PT_DYNAMIC) { phdr.p_offset = shdr.sh_offset; -- cgit v1.2.1