Skip to content

Commit 6ba561f

Browse files
committed
plumbing
1 parent 901e37a commit 6ba561f

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/patchelf.cc

+13
Original file line numberDiff line numberDiff line change
@@ -1852,6 +1852,12 @@ void ElfFile<ElfFileParamNames>::noDefaultLib()
18521852
changed = true;
18531853
}
18541854

1855+
template<ElfFileParams>
1856+
void ElfFile<ElfFileParamNames>::cleanStrTab()
1857+
{
1858+
1859+
}
1860+
18551861
template<ElfFileParams>
18561862
void ElfFile<ElfFileParamNames>::addDebugTag()
18571863
{
@@ -2140,6 +2146,7 @@ static bool removeRPath = false;
21402146
static bool setRPath = false;
21412147
static bool addRPath = false;
21422148
static bool addDebugTag = false;
2149+
static bool cleanStrTab = false;
21432150
static bool renameDynamicSymbols = false;
21442151
static bool printRPath = false;
21452152
static std::string newRPath;
@@ -2201,6 +2208,9 @@ static void patchElf2(ElfFile && elfFile, const FileContents & fileContents, con
22012208
if (renameDynamicSymbols)
22022209
elfFile.renameDynamicSymbols(symbolsToRename);
22032210

2211+
if (cleanStrTab)
2212+
elfFile.cleanStrTab();
2213+
22042214
if (elfFile.isChanged()){
22052215
writeFile(fileName, elfFile.fileContents);
22062216
} else if (alwaysWrite) {
@@ -2384,6 +2394,9 @@ int mainWrapped(int argc, char * * argv)
23842394
else if (arg == "--add-debug-tag") {
23852395
addDebugTag = true;
23862396
}
2397+
else if (arg == "--clean-strtab") {
2398+
cleanStrTab = true;
2399+
}
23872400
else if (arg == "--rename-dynamic-symbols") {
23882401
renameDynamicSymbols = true;
23892402
if (++i == argc) error("missing argument");

src/patchelf.h

+2
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ class ElfFile
158158

159159
void renameDynamicSymbols(const std::unordered_map<std::string_view, std::string>&);
160160

161+
void cleanStrTab();
162+
161163
struct GnuHashTable {
162164
using BloomWord = Elf_Addr;
163165
struct Header {

0 commit comments

Comments
 (0)