summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRolf Eike Beer <eb@emlix.com>2020-09-04 10:28:21 +0200
committerRolf Eike Beer <eb@emlix.com>2021-03-16 08:23:32 +0100
commita935c61e74d6aa5003d82b01cffa2499498c8607 (patch)
treeea34836fbed8b9865df5eaebb52fd7e8abadd2fc
parentd628ab9378d211677b1f2cdedc65627110670978 (diff)
downloadpatchelf-a935c61e74d6aa5003d82b01cffa2499498c8607.tar.gz
only one section name can match
-rw-r--r--src/patchelf.cc2
1 files changed, 1 insertions, 1 deletions
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<ElfFileParamNames>::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;