Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Date: Fri, 6 Dec 2002 12:28:01 +0100 Message-ID: <3DF0645A000007B0@mail-7.tiscalinet.it> From: fabrizio_ge-wolit AT tiscali DOT it Subject: Cannot dlsym() some symbols from a DLL built with Cygwin To: cygwin AT cygwin DOT com MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id gB6BShH17821 I am having a strange problem with a DLL built with Cygwin (gcc 3.2 200290927 and ld 2.13.90 20021118). I downloaded a package from the Net and built it as a DLL. Then, I wrote to programs, one which linked implicitly with the DLL, and one which linked explicitly (dlopen()ed the DLL, and then dlsym()ed the symbols). No problem with the implicit link. But, with the explicit link, weird things happen: dlopen() succeeds, but most dlsym() fail. The strangest thing is, some dlsym() actually succeed (they return the correct pointer) but most don't (they return NULL)! I tried to build the same DLL with the Micro$oft tools (cl.exe and link.exe), and both programs, unmodified, work! That is, all dlsym() succeed. It seems a bug in Cygwin's ld, the dynamic linker. If you request me, I can send the test programs by e-mail. __________________________________________________________________ Tiscali ADSL. Scopri la fantastica promozione di Natale: tutto Gratis fino al 9 gennaio! Abbonati ora: prima ti abboni, pił risparmi! http://point.tiscali.it/adsl/index.shtml -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/