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: Danny Smith <dannysmith at clear dot net dot nz>
- To: 'Pedro Alves' <pedro_alves at portugalmail dot pt>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Tue, 19 Dec 2006 21:48:32 +1300
- Subject: RE: [PATCH] PE direct linking to dlls, accept any filename.
Pedro Alves
Tuesday, 19 December 2006 12:47 a.m.
> To: Danny Smith
> Cc: 'Binutils'
> Subject: Re: [PATCH] PE direct linking to dlls, accept any filename.
>
>
> Danny Smith wrote:
>
> > Could you add a test for symlinks (on cygwin), eg where
> libfoo.a is a
> > symlink to $PATH/foo.dll.
> > This is what
> > if (REALPATH (entry->filename, fbuf) == NULL)
> > strncpy (fbuf, entry->filename, sizeof (fbuf));
> > is about I think.
> >
>
> You're right. Then, the REALPATH call isn't needed anymore.
> It was there so we could get the filename extension of the dll
> in the case you mention.
>
> I've added tests for symlinks. Should I guard them for MinGW? How?
> The symlink functionality comes from the host not from the target.
> Using msys or 'gcc -mno-cygwin' should work, no?
>
Mingw-hosted ld.exe (whether in msys env or built with -mno-cygwin,
depends on MS msvcrt.dll,
which has not a clue about cygwin symlinks. Cygwin-hosted ld.exe depends
on cygwin1.dll so does recognize symlinks.
> Attached is the new patch, tested on i686-pc-cygwin. I'll try
> testing on MinGW later.
>
That will be difficult. MSVCRT.dll, hence mingw ld.exe, has not a
clue about symlinks. The deja-gnu tests expects ln -s to work.
In past, I have just accepted that if it doesn't break cygwin testsuite
results, its OK for mingw. (Many of the testcases--the bootstrap ones in
particular, assume a POSIXish file system).
That is my long-winded way of saying 'nonetheless', thanks for the
patch and thank Christopher for applying.
Danny
> Cheers,
> Pedro Alves
>