Bug 6643 - cygwin LD ignores DLL extension from import def file
Summary: cygwin LD ignores DLL extension from import def file
Status: NEW
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: 2.18
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-13 03:49 UTC by Nick
Modified: 2008-06-13 03:50 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
sample .def file to demonstrate the problem (94 bytes, text/plain)
2008-06-13 03:50 UTC, Nick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nick 2008-06-13 03:49:58 UTC
Hi,

Cygwin LD seems to ignore the file extension given in a imports def file. The
resulting executable attempts to load <name>.dll even if the extension of the
DLL file is not ".dll".

For example, windows includes a DLL file called "WINSPOOL.DRV". This is a normal
DLL file that ships with windows for use by applications.

Import def file:
LIBRARY WINSPOOL.DRV
IMPORTS
	ClosePrinter = WINSPOOL.ClosePrinter
	DocumentPropertiesA = WINSPOOL.DocumentPropertiesA
	OpenPrinterA = WINSPOOL.OpenPrinterA

This links ok but the resulting executable fails when it attempts to load
"WINSPOOL.DLL".

LD version "GNU ld (GNU Binutils) 2.18.50.20080523"

Nick
Comment 1 Nick 2008-06-13 03:50:18 UTC
Created attachment 2777 [details]
sample .def file to demonstrate the problem