aboutsummaryrefslogtreecommitdiff
path: root/ld/ldmain.c
diff options
context:
space:
mode:
Diffstat (limited to 'ld/ldmain.c')
-rw-r--r--ld/ldmain.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ld/ldmain.c b/ld/ldmain.c
index e9f26e2..214847d 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -669,6 +669,14 @@ set_scripts_dir ()
if (dir)
free (dir);
+ dir = make_relative_prefix (program_name, TOOLBINDIR, SCRIPTDIR);
+ if (dir && check_for_scripts_dir (dir))
+ /* Success. Don't free dir. */
+ return;
+
+ if (dir)
+ free (dir);
+
if (check_for_scripts_dir (SCRIPTDIR))
/* We've been installed normally. */
return;