delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/05/03:20:52

From: Robert Hoehne <Robert DOT Hoehne AT Mathematik DOT tu-chemnitz DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Help with COFF & __main
Date: Tue, 03 Jun 1997 11:20:16 +0200
Organization: TU Chemnitz-Zwickau
Lines: 31
Message-ID: <3393E1D0.2E5931C6@Mathematik.tu-chemnitz.de>
References: <5mt51j$ihf AT hermes DOT acs DOT unt DOT edu>
NNTP-Posting-Host: pandora.hrz.tu-chemnitz.de
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019