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]

rpath-link on Windows


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.


*** elf32.em 23 Sep 2009 13:54:28 -0000 1.204
--- elf32.em 21 Oct 2009 14:04:27 -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))
+ {
+ const char *p = strchr (s + 1, config.rpath_separator);
+ if (p != NULL)
+ s = p;
+ }
+ #endif



OK?


Regards,

Ryan Mansfield


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