Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion tests/shared-rpath.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ echo "#### Number of a_symbol_name strings in the library: $previous_cnt"
echo "#### Rename the rpath to something larger than the original"
# Pathelf should detect that the rpath string is shared with the symbol name string and avoid
# tainting the string with Xs
"${PATCHELF}" --set-rpath a_very_big_rpath_that_is_larger_than_original --output liblarge-rpath.so "${LIB_NAME}"
output=$("${PATCHELF}" --set-rpath a_very_big_rpath_that_is_larger_than_original --output liblarge-rpath.so "${LIB_NAME}" 2>&1)

# The number of rpath references depends on linker's ability to perform
# strings deduplication optimization. Not all linkers do that, so skip the
# test if there is only 1 reference
(echo $output | grep 'Number of rpath references: 1') && exit 77

echo "#### Checking symbol is still there"
${NM} -D liblarge-rpath.so | grep a_symbol_name
Expand Down