summaryrefslogtreecommitdiff
path: root/scripts/xldd.in
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)
commitb98f8fe48f6ded8a0bf29b8dc6d72ce0eaffed46 (patch)
treef76db18da27fc7364c974f6e6c0ef9e332e3a070 /scripts/xldd.in
parentdc4498ca35f335e81f6d30d451bddc1b2eed06b7 (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>
Diffstat (limited to 'scripts/xldd.in')
-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