Skip to content

Commit e2fe56f

Browse files
committed
Remove zeroing out logic in modifySoname
The original SONAME is filled with 'X' characters in the modifySoname function. This can cause issues if the .dynstr entry is still referenced in other sections, e.g. some libraries use the SONAME entry as version specifiers.
1 parent df5538a commit e2fe56f

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

src/patchelf.cc

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,13 +1074,6 @@ void ElfFile<ElfFileParamNames>::modifySoname(sonameMode op, const std::string &
10741074
return;
10751075
}
10761076

1077-
/* Zero out the previous SONAME */
1078-
unsigned int sonameSize = 0;
1079-
if (soname) {
1080-
sonameSize = strlen(soname);
1081-
memset(soname, 'X', sonameSize);
1082-
}
1083-
10841077
debug("new SONAME is '%s'\n", newSoname.c_str());
10851078

10861079
/* Grow the .dynstr section to make room for the new SONAME. */

0 commit comments

Comments
 (0)