delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/02/13/16:42:25

From: John Fine <johnfine AT erols DOT com>
Newsgroups: alt.msdos.programmer,comp.lang.c++,comp.arch.embedded,comp.os.msdos.djgpp
Subject: Re: Specifing the location of a function
Date: Sun, 13 Feb 2000 16:19:21 -0500
Lines: 28
Message-ID: <38A71FD9.3D48F580@erols.com>
References: <8866lt$t10$1 AT nclient3-gui DOT server DOT dtn DOT ntl DOT com>
Mime-Version: 1.0
X-Trace: 2SzKJeGPCyXZRuc+/n3VRrbsEI1ZsSQq0YMI5MY7I+k=
X-Complaints-To: abuse AT rcn DOT com
NNTP-Posting-Date: 13 Feb 2000 21:16:29 GMT
X-Accept-Language: en
X-Mailer: Mozilla 4.51 [en]C-CCK-MCD {Typeline;BankBoston} (WinNT; U)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Andrew Betts wrote:
 
> Specifing the location of a function / dynamic loading for .COM

  I don't understand why you want to.  Memory is cheap, CPU's have
supported 32-bit addressing for a long time.  Why would you want to
stretch the limits of tiny model programming?

  Also DJGPP (one of the newsgroups you posted to) is strictly 32-bit. 
If you want to use DJGPP, forget about 64Kb limits and tiny model.  If
you want tiny model, pick a 16-bit compiler.

  But if you do really want to, get my linker JLOC (see my web page).

> The way I thought I could acheive this was by telling the compiler I have a
> function at address XYZ and then loading from disk into this address the
> code I want.

  There is no good way and no need to tell the compiler where the code
is.  With JLOC, you must write a control file which tells JLOC how to
link your program.  It sounds like you want many modules which are each
linked at the same linear address, but go into the image file in
different places.  JLOC can manage all that for you, and can deal with
separate values for the disk file offset of each symbol vs. its run time
offset.
-- 
http://www.erols.com/johnfine/
http://www.geocities.com/SiliconValley/Peaks/8600/

- Raw text -


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