Mail Archives: djgpp/1997/06/05/03:20:52
Matthew Brendan Grantz wrote:
>
> extract all the functions, and relocate them. All except for one, that
> is: main(). It requires the relocation of a relative symbol called
> __main. This symbol can easily be aquired by including a line in the
The function __main() is in libc.
>
> extern unsigned __main;
This is probably a bad idea, because __main() has to setup important
things.
> manage to fudge this into functioning. Is it POSSIBLE to execute the
> main() function in a .O file by loading and relocating it?
Because I do not know exactly what you want to get with
your technique, I cannot help so much. Please decribe a
little bit more, what you want to do. Adn when you speak
abaout a COFF file, is this the output from the linker or
from the assembler?
Robert
--
*****************************************************************
* Robert Hoehne, Fakultaet fuer Mathematik, TU-Chemnitz-Zwickau *
* Post: Am Berg 3, D-09573 Dittmannsdorf *
* e-Mail: Robert DOT Hoehne AT Mathematik DOT TU-Chemnitz DOT DE *
* WWW: http://www.tu-chemnitz.de/~rho *
*****************************************************************
- Raw text -