Re: Executable entry point
Re: Executable entry point
- Subject: Re: Executable entry point
- From: Jonas Maebe <email@hidden>
- Date: Thu, 22 Mar 2007 10:39:42 +0100
On 22 Mar 2007, at 10:23, Filipe Cabecinhas wrote:
This suggests to me that dyld doesn't get initialised properly.
Have you tried linking in /usr/lib/crt1.o already? In that case,
you may not be able to specify an alternate entry point though.
Another option may be to add the source code of crt1.o to your
program so you can change its symbol names for entry point and
where it jumps to in your program after it finishes initialising,
but note that it was quite a convoluted mess the last time I
looked at it.
If it's publicly available could you show me that library so I
could see how you've done that?
Our source code is available, but I'm not sure if it'll be of much
use of you since it's all written in Pascal (it's part of the run
time library for the Free Pascal Compiler). If you want, I can point
you to the files in question.
But I'm not sure what you are referring to with "it". To clarify: I
have not integrated the source code of crt1.o in our run time
library. What we do is give our entry point the assembler name
"_main" and link in crt1.o. crt1.o simply calls _main after it's
finished with doing its thing, and the application takes over from
there. This is the same way it works for gcc and (almost?) any other
compiler which generates programs for Mac OS X.
Jonas
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden