aboutsummaryrefslogtreecommitdiff
path: root/ld/ldmain.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2000-05-26 13:11:57 +0000
committerAlan Modra <amodra@gmail.com>2000-05-26 13:11:57 +0000
commit5af11cab92a8d4ed9b0cd7a46f05cf02a8ba901e (patch)
tree43c01869523de4ad682493e6674e5e8a9fed1804 /ld/ldmain.c
parent010c70e10fb422ae6151a8808215a122f461fce8 (diff)
downloadgdb-5af11cab92a8d4ed9b0cd7a46f05cf02a8ba901e.zip
gdb-5af11cab92a8d4ed9b0cd7a46f05cf02a8ba901e.tar.gz
gdb-5af11cab92a8d4ed9b0cd7a46f05cf02a8ba901e.tar.bz2
Eli Zaretskii's DOSish file name patches.
Diffstat (limited to 'ld/ldmain.c')
-rw-r--r--ld/ldmain.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/ld/ldmain.c b/ld/ldmain.c
index 7372594..48f35ef 100644
--- a/ld/ldmain.c
+++ b/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"
@@ -569,6 +570,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)
{