This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: R: does LD_PRELOAD work under cygwin?
- From: basic <basic at mozdev dot org>
- To: cygwin at cygwin dot com
- Date: Fri, 04 Dec 2009 16:57:29 +0800
- Subject: Re: R: does LD_PRELOAD work under cygwin?
- References: <991032.65593.qm@web25505.mail.ukl.yahoo.com>
On 12/04/2009 03:05 PM, Marco Atzeri wrote:
> --- Ven 4/12/09, basic ha scritto:
>
>> Hi,
>> Does LD_PRELOAD work under cygwin? I've tried the
>> following without success:
>
> LDPRELOAD works with few peculiarites for multiple dll's
> but this is not your case.
>
>>
>> gcc test.c
>> gcc -shared testlib.c -o testlib.dll
>
> see documentation
> http://cygwin.com/cygwin-ug-net/dll.html
> on how to build and link dll's
I've read the document, but I do not see what I'm doing is any different from it. Any hints?
>
>>
>> LD_PRELOAD=$HOME/testlib.dll ./a.exe
>>
>> where test.c is:
>>
>> #include <fcntl.h>
>>
>> int main()
>> {
>> open("", 1);
>> return 0;
>> }
>>
>>
>> and testlib.c is:
>>
>> #include <stdio.h>
>>
>> int open(const char *s, int i, ...)
>> {
>> puts("test");
>> return 0;
>> }
>>
>> Is there anything I'm doing wrong? Or is it just not
>> supported?
>>
>> --
>> basic
>>
> regards
> Marco
>
>
>
>
--
basic
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple