summaryrefslogtreecommitdiff
path: root/contrib/binutils/ld/ldmain.c
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>2000-06-20 06:20:42 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>2000-06-20 06:20:42 +0000
commit6e440a7238ea2cc0d7c55b88e9ce7da9ca2e76d8 (patch)
treecfce85e69f41daea5ce68dcaadc298aeb5c9b645 /contrib/binutils/ld/ldmain.c
parentddad85161da2b7c7b3d88bc7f46995d05db9e719 (diff)
parent9cf1d3773b86cefa5afcb52cbfae9cb335bb7637 (diff)
Notes
Diffstat (limited to 'contrib/binutils/ld/ldmain.c')
-rw-r--r--contrib/binutils/ld/ldmain.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/contrib/binutils/ld/ldmain.c b/contrib/binutils/ld/ldmain.c
index ba2a5923e3e6..676eeba26b7c 100644
--- a/contrib/binutils/ld/ldmain.c
+++ b/contrib/binutils/ld/ldmain.c
@@ -1,5 +1,5 @@
/* Main program of GNU linker.
- Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 1999
+ Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
Written by Steve Chamberlain steve@cygnus.com
@@ -27,6 +27,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "libiberty.h"
#include "progress.h"
#include "bfdlink.h"
+#include "filenames.h"
#include "ld.h"
#include "ldmain.h"
@@ -567,6 +568,14 @@ set_scripts_dir ()
/* Look for "ldscripts" in the dir where our binary is. */
end = strrchr (program_name, '/');
+#ifdef HAVE_DOS_BASED_FILE_SYSTEM
+ {
+ /* We could have \foo\bar, or /foo\bar. */
+ char *bslash = strrchr (program_name, '\\');
+ if (bslash > end)
+ end = bslash;
+ }
+#endif
if (end == NULL)
{