@@ -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+
18551861template <ElfFileParams>
18561862void ElfFile<ElfFileParamNames>::addDebugTag()
18571863{
@@ -2140,6 +2146,7 @@ static bool removeRPath = false;
21402146static bool setRPath = false ;
21412147static bool addRPath = false ;
21422148static bool addDebugTag = false ;
2149+ static bool cleanStrTab = false ;
21432150static bool renameDynamicSymbols = false ;
21442151static bool printRPath = false ;
21452152static 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" );
0 commit comments