delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/06/03/03:11:13

Message-Id: <199906030711.DAA15100@delorie.com>
Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
From: "John Aitchison" <jaitchis AT lisp DOT com DOT au>
To: cygwin AT sourceware DOT cygnus DOT com
Date: Thu, 3 Jun 1999 17:13:16 +1000
MIME-Version: 1.0
Subject: Does G77 on W95 produce standard .OBJ files ?
Reply-to: jaitchis AT lisp DOT com DOT au
X-mailer: Pegasus Mail for Win32 (v3.11)

I hope so .. I want to link some .OBJ files (Fortran77 source) into a 
Delphi2 prog .. Delphi says it can be done as long as they are standard 
Intel format relocatables , with some caveats  (below)

So, is a .O file produced by G77 (and I suppose therefore by GCC) the same 
as a .OBJ file ?  

I would be happy to be pointed in the direction of the Fine Manual, if 
there is one that addresses this point, so I can RTFM.

o, and a pointer to where I can read about producing DLL's with G77 would 
be nice too.

thanks, all




Delphi says
----------------
When an object file appears in a $L directive, Object Pascal converts the 
file from the Intel relocatable object module format (.OBJ) to its own 
internal relocatable format. 
This conversion is possible only if the following rules are observed:

All procedures and functions must be placed in a segment named CODE or 
CSEG, or in a segment whose name ends in _TEXT.
	Initialized variables must be placed in a segment named CONST or in a 
segment whose name ends in _DATA.
	Uninitialized private variables must be placed in a segment named DATA or 
DSEG, or in a segment whose name ends in _BSS.
	All other segments are ignored, and so are GROUP directives. 
	Code segments are always byte aligned.

Data segments are always word aligned. 
	Object Pascal ignores any data for segments other than the code segment 
(CODE, CSEG, or xxxx_TEXT) and the initialized data segment (CONST or 
xxxx_DATA). So, when declaring variables in the uninitialized data segment 
(DATA, DSEG, or xxxx_BSS), always use a question mark (?) to specify the 
value.
	Byte-sized references to EXTRN symbols are not allowed.

Segment definitions can optionally specify PUBLIC and a class name; 
however, both are ignored.

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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