Embedded gij questions
Peter Blemel
pblemel@hotmail.com
Sat Jul 17 08:41:00 GMT 2004
Hello World,
The RTOS that I am using starts applications in a nonstandard way, in that
main() does not get passed the "standard" argv & argc -- it is passed a
single integer argument instead. My gcj compiled application therefore
mistakenly passes 'garbage' to _Jv_RunMain, because it's main believes that
main's stack has argc & argv when in fact it has a single long integer.
This results in undesireable behaviour (as I'm sure that you can imagine).
Setting a breakpoint in _Jv_RunMain I see that 'main' is powerpc assembler
in ccEMVipm.i, where I would have hoped to find some semblance of gij.cc
that could be tweaked instead. My question is simply "What's the best way
to deal with this situation?"
One hack is to simply modify _Jv_RunMain to ignore the argument vector, but
I'd like a more elegant solution. I will probably do this tonight because
I'm eager to see my code run cleanly ;-)
It seems to me that I should be able to take gij.cc and make a copy that
does what I want. I'm not sure what the relationship between gij.cc, which
appears to deal more with bytecode classes, and a gcj compiled & linked
binary is. I know that the class loader can search shared objects for
classes, but I don't know how it deals with the compiled binary main class.
What is the best way to deal with this situation given that my goal is to
compile my application into machine code and execute it?
Thanks and Regards,
Peter Blemel
_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfee®
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
More information about the Java-patches
mailing list