File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -2134,7 +2134,7 @@ void ElfFile<ElfFileParamNames>::renameDynamicSymbols(const std::unordered_map<s
21342134 }
21352135 }
21362136
2137- if (changed )
2137+ if (!extraStrings. empty () )
21382138 {
21392139 auto newStrTabSize = strTab.size () + extraStrings.size ();
21402140 auto & newSec = replaceSection (" .dynstr" , newStrTabSize);
Original file line number Diff line number Diff line change @@ -82,3 +82,9 @@ ${PATCHELF} --rename-dynamic-symbols ../map *
8282
8383echo " # Run the patched tool and libraries"
8484env LD_BIND_NOW=1 LD_LIBRARY_PATH=${PWD} ./many-syms-main
85+
86+ # Test that other switches still work when --rename-dynamic-symbols has no effect
87+ echo " SYMBOL_THAT_DOESNT_EXIST ANOTHER_NAME" > map
88+ ${PATCHELF} --set-rpath changed_rpath --rename-dynamic-symbols map --output libnewrpath.so " $full_lib_name "
89+ [ " $( ${PATCHELF} --print-rpath libnewrpath.so) " = changed_rpath ] || exit 1
90+
You can’t perform that action at this time.
0 commit comments