Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Aug 1997 21:30:17 -0700
From:      John Polstra <jdp@polstra.com>
To:        hackers@freebsd.org
Subject:   Re: Please Help Me Understand dlopen()]
Message-ID:  <199708260430.VAA03012@austin.polstra.com>
In-Reply-To: <19970819085282.NTM1204@umes01.avl.co.at>
References:  <19970819085282.NTM1204@umes01.avl.co.at>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <19970819085282.NTM1204@umes01.avl.co.at>,
Hermann Schinagl  <schinagl@avl.co.at> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199708260430.VAA03012>