From owner-freebsd-hackers Wed Aug 20 16:44:16 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id QAA16394 for hackers-outgoing; Wed, 20 Aug 1997 16:44:16 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.50]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id QAA16388 for ; Wed, 20 Aug 1997 16:44:13 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id QAA21244; Wed, 20 Aug 1997 16:35:28 -0700 From: Terry Lambert Message-Id: <199708202335.QAA21244@phaeton.artisoft.com> Subject: Re: Please Help Me Understand dlopen()] To: schinagl@avl.co.at (Hermann Schinagl) Date: Wed, 20 Aug 1997 16:35:28 -0700 (MST) Cc: hackers@FreeBSD.ORG In-Reply-To: <19970819085282.NTM1204@umes01.avl.co.at> from "Hermann Schinagl" at Aug 19, 97 08:52:40 am X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > You forgot that the symbols, which are exported by the lib are > totally different, if you rename a .c file to .cpp and compile > it again. ==> C++ exported symbols > > Well, it is easy to add '_' before the symbol, but the function-arguments > of a C++ exported function are append encoded to the symbolname. > eg.: '__func027_dfiv' > > So writing a wrapper is not that straight forward as mentioned > above. You should also think of the C++ exporting mechanism. How do you return a non-NULL pointer with argument type information for symbol space munging, per C++? We all know that the name is not the correct place to mung the symbol, but for some reason, we are married to stupid linkers and less-than-clevel object file symbol table formats. 8-(. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.