This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: rpath-link on Windows


Ryan Mansfield wrote:
Drive letters are parsed as the rpath-link separator on windows preventing cross platform linker users from specifying absolute paths that contain drive letters. This change follows the behavior of other parts of the linker that assume a single letter followed by a colon is a drive specifier.

2009-10-21 Ryan Mansfield <rmansfield@qnx.com>

    PR ld/10489
        * emultempl/elf32.em (gld${EMULATION_NAME}_search_needed): Handle
        drive specifiers for DOS based filesystems in rpath-link strings.


Sorry, here's the correct diff:


Index: elf32.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/elf32.em,v
retrieving revision 1.204
diff -c -3 -p -r1.204 elf32.em
*** elf32.em 23 Sep 2009 13:54:28 -0000 1.204
--- elf32.em 21 Oct 2009 14:54:30 -0000
*************** gld${EMULATION_NAME}_search_needed (cons
*** 471,476 ****
--- 471,486 ----
s = strchr (path, config.rpath_separator);
if (s == NULL)
s = path + strlen (path);
+
+ #if defined (__MSDOS__) || defined (_WIN32)
+ /* Assume a match on the second char is part of drive specifier */
+ if (config.rpath_separator == ':' && s == path + 1 && ISALPHA (*path))
+ {
+ s = strchr (s + 1, config.rpath_separator);
+ if (s == NULL)
+ s = path + strlen (path);
+ }
+ #endif


        filename = (char *) xmalloc (s - path + len + 2);
        if (s == path)

Regards,

Ryan Mansfield


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]