summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2010-11-23 20:35:10 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2010-11-23 20:35:10 (GMT)
commit9a88bb84fb828797165501c283296dbc174ba3f0 (patch)
tree9ce4d3ce37cafe69e2a5b2a66a8eff1fb28952bb
parent0b2a713bcc00f26bc4aacef52b5c837c01a34364 (diff)
scripts/xldd: stop at first match
Break the library search loop as soon as a match is found. Previously, if a library was present in different places, then the last occurence would be returned, when the first one would have been used at runtime. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> (transplanted from 78d2f99d403f7092203fc7a119ec19f9a2108afa)
-rwxr-xr-xscripts/xldd.in2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/xldd.in b/scripts/xldd.in
index 0c88f93..30077ad 100755
--- a/scripts/xldd.in
+++ b/scripts/xldd.in
@@ -170,12 +170,14 @@ do_find_needed() {
for d in "${needed_search_path[@]}"; do
if [ -f "${root}${d}/${needed}" ]; then
found="${d}/${needed}"
+ break
fi
done
if [ -z "${found}" ]; then
for d in "${needed_search_path[@]}"; do
if [ -f "${sysroot}${d}/${needed}" ]; then
found_sysroot="${d}/${needed}"
+ break
fi
done
fi