This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] PE direct linking to dlls, accept any filename.
- From: Daniel Jacobowitz <drow at false dot org>
- To: Pedro Alves <pedro_alves at portugalmail dot pt>
- Cc: binutils at sourceware dot org
- Date: Fri, 15 Dec 2006 10:56:23 -0500
- Subject: Re: [PATCH] PE direct linking to dlls, accept any filename.
- References: <4582C2FF.6060402@portugalmail.pt>
On Fri, Dec 15, 2006 at 03:45:03PM +0000, Pedro Alves wrote:
> The gdb testsuite in some shared lib tests, builds shared libs with .so
> or .sl extension uncondicionally,
> and then tries to do a direct link, even on PE platforms (eg:cygwin).
> That fails to link with current ld.
> I sent a patch there to fix a few cases, by introducing a $SOEXT var in
> the testsuite.
> But thinking again, I can't see a reason ld doesn't let us do a direct
> link to a dll with an extension
> other than ".dll" or ".DLL". The Windows loader is happy to load the
> dlls, and in fact there are many
> examples of dlls without a ".dll" extension in production.
>
> The attached patch makes ld be able to direct link any dll without
> looking at the filename extension.
Sorry I hadn't gotten around to looking at the GDB patches yet. But,
this is exactly what I wondered when I saw them. I had foolishly
assumed it was a Windows limitation. But if you can do this instead,
I like it much better!
--
Daniel Jacobowitz
CodeSourcery