X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-0.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Message-ID: <4B189861.9090702@mozdev.org> Date: Fri, 04 Dec 2009 13:04:33 +0800 From: basic User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.4pre) Gecko/20090928 Thunderbird/3.0b4 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: does LD_PRELOAD work under cygwin? Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Hi, Does LD_PRELOAD work under cygwin? I've tried the following without success: gcc test.c gcc -shared testlib.c -o testlib.dll LD_PRELOAD=$HOME/testlib.dll ./a.exe where test.c is: #include int main() { open("", 1); return 0; } and testlib.c is: #include 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 -- 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