Problem with main routine during linking

Bryce McKinlay bryce@waitaki.otago.ac.nz
Mon May 7 02:08:00 GMT 2001


Martin Kahlert wrote:

> The problem is that gcj puts the main function (i.e. the object containing
> the main routine) after all user command line options in the link step.
> I would propose to put it in front of it as the first object (after crtbegin
> and friends).
> So you can link to libraries containing main function dummies (like g77's libg2c).
>
> Is there any problem with that?

I don't see any problems, if it works for you.

> Unfortunately, i do not know, where this linking actually happens and which
> file i have to look at to change that.

You can start by looking at gcc/java/jvspec.c. It has something to do with lang_specific_extra_outfiles.
Unfortunatly the driver stuff tends to be pretty incomprehensible ;-(

regards

  [ bryce ]




More information about the Java mailing list