From: elio AT pvax DOT Ico DOT Olivetti DOT Com >From: elio AT pvax (Elio Tondo) Subject: Re: object file format change? To: dliu AT faraday-gw DOT njit DOT edu (Dong Liu) Date: Mon, 5 Dec 1994 10:51:52 +0100 (MET) Cc: djgpp AT sun DOT soe DOT clarkson DOT edu > I remember someone mentioned he needed COFF format because MASM could > only produce COFF file. I think "objcopy" from binutils could be used to > convert COFF to ELF. I tried to convert an a.out to ELF, it worked. > But we need to configure both COFF and ELF in the binutils for V. 2. I think the switch to ELF is a good thing; COFF is older, less versatile while ELF is the standard object file format in SVR4 since its early days and it looks like the way Linux will follow to add SVR4 binary compatibility. If ELF can help in adding the shared libraries to DJGPP, this is also a very good reason to use it. I think the backward compatibility can be easily obtained the way currently the old a.out format is handled: LD.EXE can link go32coff and a.out formats, so probably the V2.0 LD.EXE can be configured to handle ELF by default, COFF as an auxiliary input binary format. This way old libraries can be used when needed. I agree that also the other binutils should be configured the same way, especially objcopy. A final note: I think it would be a very good thing to put some effort in finding an easy way to configure a cross development environment on Linux and/or on the free BSD variants; I see that these configuration issues are a FAQ on this list, and currently there isn't a straightforward way to set up all the various aspects of the cross configuration (some things are done only in .BAT files that are useless on Unix-like environments). There is also some confusion in the binary formats, with similar configuration names that give different and slightly incompatible binary formats (i386go32 uses the i386coff format, while go32 uses the go32coff one, that has some minor modifications). It looks like different people did different additions to the GNU sources, maybe Cygnus for the cross environment and DJ for the DOS one; moreover the GCC setup is usually slightly behind of the binutils (at least this was the case when gcc 2.5.8 and binutils 2.4 were the current versions). My suggestion is to use plain ELF (with no variant like go32coff) and to try to use Unix-like configuration files (maybe shell scripts, to be executed with some PD shell for DOS like ms_sh); this would make easier to configure a cross environment, and would add almost no complication to the native DOS one. A new target name (e.g. djgpp2) would be useful to distinguish the new setup from the old ones. Thanks to DJ and to the other developers for the effort they are putting in the new release. Elio _____________________________________________________________________________ | __ ___ | Olivetti - Viale Gramsci 12 - Pisa, Italy | |_ | . _ | _ _ _| _ | Tel: +39-50-516554 Fax: +39-50-502664 | |__ | | (_) | (_) | | (_| (_) | elio AT olivetti DOT com | Standard disclaimers.