X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Matthieu CASTET Subject: Usage of =?utf-8?b?TERfUFJFTE9BRA==?= Date: Wed, 5 Mar 2008 08:47:13 +0000 (UTC) Lines: 32 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: Loom/3.14 (http://gmane.org/) 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, I am trying to use LD_PRELOAD on cygwin, but I don't manage to make work. I suppose I do something wrong when creating my library. What I do is : $ cat << EOF > /tmp/toto1.c #include int chmod(const char *path, mode_t mode) { printf("123\n"); return -1; } EOF $ module=toto1 gcc -shared -o /tmp/cyg${module}.dll -Wl,--out-implib=lib${module}.dll.a -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--whole-archive /tmp/toto1.c -Wl,--no-whole-archive $ export LD_PRELOAD=/tmp/cygtoto1.dll $ chmod a+w /tmp/toto1.c <-- chmod isn't redirected here (but the library is loaded). Any idea why it doesn't work ? Thanks Matthieu -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/