🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #46522

where is link to ___builtin_new created?

#46522
From: Sarah Officer
Date: Fri, 11 Nov 1994 15:33
25 lines
2052 bytes
My goal is to call a C function which calls a C++ function (that uses C++
classes) from Scheme Toolkit (STk).  STk allows its scheme vocabulary to be
extended to call C functions by dynamically loading a shared object file.
I have accomplished this by writing a C program, compiling with gcc, 
creating a shared object file with 'ld', and loading to STk.  Then I created
some C++ functions that access C++ classes.  I wrapped them in 'extern "C" {}'
so that the names would not be mangled.  I can compile this with g++,
compile C routines to call them with gcc, and link with gcc.  My executable
calls the C++ routines with no difficulty.  Then, instead of linking with
gcc, I used 'ld' to create a shared object.  When I try to load this to
STk, I get the message 
	'ld.so: Undefined symbol: ___builtin_new

I tried to find out where g++ links to ___builtin_new so that I could 
explicitly link to this, but when I run 'nm' on the libg++.a, I see that
all instances of ___builtin_new are undefined.  

Where does g++ build the link to ___builtin_new?  Is it in-lined?  Do you
have any suggestions for me?  I have tried to ask the STk people about this,
but so far I have no solutions.  If you cannot help me, do you know who can?

Thank you very much,

Sarah Officer
officers@aries.tucson.saic.com
Technical Details
Message-ID: <9411111532.AA01852@aries.tucson.saic.com>
Path: arc1-ca.pugleaf.net!nntp.gmd.de!newsserver.jvnc.net!news.cac.psu.edu!news.pop.psu.edu!hudson.lm.com!godot.cc.duq.edu!news.duke.edu!convex!cs.utexas.edu!math.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!aries.tucson.saic.com!officers

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,162ae881ef673ab2,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1994-11-11 12:42:19 PST
Path: arc1-ca.pugleaf.net!nntp.gmd.de!newsserver.jvnc.net!news.cac.psu.edu!news.pop.psu.edu!hudson.lm.com!godot.cc.duq.edu!news.duke.edu!convex!cs.utexas.edu!math.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!aries.tucson.saic.com!officers
From: officers@aries.tucson.saic.com (Sarah Officer)
Newsgroups: gnu.gcc.help
Subject: where is link to ___builtin_new created?
Date: 11 Nov 1994 10:33:15 -0500
Organization: GNUs Not Usenet
Lines: 25
Sender: daemon@cis.ohio-state.edu
Distribution: gnu
Message-ID: <9411111532.AA01852@aries.tucson.saic.com>