Skip to content

Commit a935c61

Browse files
committed
only one section name can match
1 parent d628ab9 commit a935c61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/patchelf.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ void ElfFile<ElfFileParamNames>::writeReplacedSections(Elf_Off & curOff,
710710

711711
/* If this is the .dynamic section, then the PT_DYNAMIC segment
712712
must be sync'ed with it. */
713-
if (sectionName == ".dynamic") {
713+
else if (sectionName == ".dynamic") {
714714
for (auto & phdr : phdrs) {
715715
if (rdi(phdr.p_type) == PT_DYNAMIC) {
716716
phdr.p_offset = shdr.sh_offset;

0 commit comments

Comments
 (0)