[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/25713] Linker(ld.exe) runs in Windows unable to find file if pat
From: |
torbjorn.svensson at st dot com |
Subject: |
[Bug ld/25713] Linker(ld.exe) runs in Windows unable to find file if path length is more than 260 characters. |
Date: |
Thu, 23 Sep 2021 18:52:26 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=25713
Torbjörn SVENSSON <torbjorn.svensson at st dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |torbjorn.svensson at st dot com
--- Comment #21 from Torbjörn SVENSSON <torbjorn.svensson at st dot com> ---
I think this bug should be reopened as there are a few issues with the patches
for this bug.
1. The \\?\ notation does not allow \.\ in the string. A simple way to see this
error is to place an object file deeper than 260 characters and then use 'ar -r
libfoo.a ./path/to/file.o' where the relative path to the file will expand to
an absolute path longer than 260 characters.
2. Why is there a 'strstr (filename, ".o") != NULL' as a condition? I don't see
any reason why limiting it to .o files would be a good idea as it's not even
checking that the path ends with .o...
To use the \\?\ notation, the concatenated string must be an absolute path.
Also, it would be better to use the wide char API functions for long paths, in
this particular function, it would be _wfopen() instead of fopen().
--
You are receiving this mail because:
You are on the CC list for the bug.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug ld/25713] Linker(ld.exe) runs in Windows unable to find file if path length is more than 260 characters.,
torbjorn.svensson at st dot com <=