| main() {
epsym();
}
Seriously, if you must do this, then you also need to do all the environment
setup stuff that crt0.o does for you when you use main(). That's the real
start point of your program, not main, and if those things don't happen,
then main will probably fail miserably.
And no, I won't help you figure out what those things are.
|
| To add a little to John's reply:
As he says, there's a fair amount of initialization that occurs in crt0.o.
The most important is the establishment of the gp pointer - without that,
you can't address any global symbols. I think it would be difficult to
write a C routine that could do the things you need to do - it would likely
have to be written in assembly. So even if they made this work, it would
not be any more portable than some other solution.
crt0.o is essentially part of libc. If you don't plan to use crt0.o then you
can't reliably use libc either.
The -e option on the linker is not really intended for use in linking images
that are intended to be run in the DIGITAL UNIX environment - it's a special
option that is most often used for linking ROM images and imbedded systems
type stuff - i.e. images that will not be using the DIGITAL UNIX libc and
other libraries.
Perhaps if you explained more _why_ the customer must use this option
we can help more.
|