[Bug ld/22948] New: Modify ld search path to match libxxx.lib

2018-03-10 Thread ryan.gl.scott at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22948

Bug ID: 22948
   Summary: Modify ld search path to match libxxx.lib
   Product: binutils
   Version: 2.27
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: ryan.gl.scott at gmail dot com
CC: tnfchris at sourceware dot org
  Target Milestone: ---
Target: mingw32

According to https://sourceware.org/binutils/docs/ld/WIN32.html for Windows the
standard shared library search order is:


```
For instance, when ld is called with the argument ‘-lxxx’ it will attempt to
find, in the first directory of its search path,

libxxx.dll.a
xxx.dll.a
libxxx.a
xxx.lib
cygxxx.dll (*)
libxxx.dll
xxx.dll
```

Could the search path be changed to

```
libxxx.dll.a
xxx.dll.a
libxxx.a
xxx.lib
libxxx.lib <-- new
cygxxx.dll (*)
libxxx.dll
xxx.dll
```

This way projects like PostgreSQL, which name their import libraries libpq.lib,
will use the import library instead of trying to link to libpq.dll directly
which, due to its imagebase outside the 4gb range, will end up truncating the
R_X86_64_PC32 relocation.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/22948] Modify ld search path to match libxxx.lib

2018-03-22 Thread ryan.gl.scott at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22948

--- Comment #2 from Ryan Scott  ---
That patch does fix the issue I was having, but in order to make it work, I had
to copy those changes to the pep.em file (not just pe.em).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/22948] Modify ld search path to match libxxx.lib

2018-03-23 Thread ryan.gl.scott at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22948

--- Comment #5 from Ryan Scott  ---
Wonderful, thanks!

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils