From owner-freebsd-hackers Mon Aug 25 21:30:22 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id VAA05888 for hackers-outgoing; Mon, 25 Aug 1997 21:30:22 -0700 (PDT) Received: from austin.polstra.com (austin.polstra.com [206.213.73.10]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id VAA05881 for ; Mon, 25 Aug 1997 21:30:18 -0700 (PDT) Received: from austin.polstra.com (jdp@localhost) by austin.polstra.com (8.8.7/8.8.5) with ESMTP id VAA03012 for ; Mon, 25 Aug 1997 21:30:17 -0700 (PDT) Message-Id: <199708260430.VAA03012@austin.polstra.com> To: hackers@freebsd.org Subject: Re: Please Help Me Understand dlopen()] In-Reply-To: <19970819085282.NTM1204@umes01.avl.co.at> References: <19970819085282.NTM1204@umes01.avl.co.at> Organization: Polstra & Co., Seattle, WA Date: Mon, 25 Aug 1997 21:30:17 -0700 From: John Polstra Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk In article <19970819085282.NTM1204@umes01.avl.co.at>, Hermann Schinagl wrote: > 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 That doesn't matter. Even for C++, the only difference between the a.out symbol and the ELF symbol is that the a.out version has an extra leading `_'. > 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' The underscore is only added to symbols that have file scope. It doesn't affect the names of function parameters. > So writing a wrapper is not that straight forward as mentioned > above. You should also think of the C++ exporting mechanism. Trust me, I've thought this all the way through. There's no problem for C++ that doesn't already exist for C. John -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Self-knowledge is always bad news." -- John Barth