[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#116823: Debian's g++-3.0 forgets to generate some code.



On Wed, Oct 24, 2001 at 01:06:48PM +0200, Richard B. Kreckel wrote:
> 
> OOOoooooooooooooooooooooooooooooooooopppppppppppppppppsssssss............
> 
> Could you please provide a pointer or two to code samples or things that
> might be helpful implementing it the Right Way, since I intend to try and
> fix it?  (Dunno if I'm old enough for this, though.)
> 
> Thanks a lot for all the input, anyways.

The basic trick is to create a section containing pointers to all
functions you want called.  The code to do it is in crtstuff.c in the
GCC source, but it's a bit on the nasty side.  Then you put a symbol
__FOO_BEGIN__ in an object file _at the beginning of your link command_
in that same section, and __FOO_END__ in an object file at the end.

I don't understand at all why CLN is jumping through these hoops.  It
looks like it could just create global objects, and piggyback on GCC's
constructor mechanism.  What on earth is it trying to accomplish?

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer



Reply to: