X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Rugxulo Newsgroups: comp.os.msdos.djgpp Subject: Re: Compiling ELF with DJGPP Date: Thu, 3 Jul 2008 22:01:28 -0700 (PDT) Organization: http://groups.google.com Lines: 38 Message-ID: <0a6800d3-53c8-4fa6-b5da-1640c06d89c1@s50g2000hsb.googlegroups.com> References: <3ddfcf550807030910x36cbc9c4i825f23e6511b1c2 AT mail DOT gmail DOT com> <200807031627 DOT m63GRgde023374 AT envy DOT delorie DOT com> NNTP-Posting-Host: 65.13.115.246 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1215147689 26716 127.0.0.1 (4 Jul 2008 05:01:29 GMT) X-Complaints-To: groups-abuse AT google DOT com NNTP-Posting-Date: Fri, 4 Jul 2008 05:01:29 +0000 (UTC) Complaints-To: groups-abuse AT google DOT com Injection-Info: s50g2000hsb.googlegroups.com; posting-host=65.13.115.246; posting-account=p5rsXQoAAAB8KPnVlgg9E_vlm2dvVhfO User-Agent: G2/1.0 X-HTTP-UserAgent: Opera/9.50 (Windows NT 6.0; U; en),gzip(gfe),gzip(gfe) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id m645F473017808 Reply-To: djgpp AT delorie DOT com Hi, On Jul 3, 11:27 am, DJ Delorie wrote: > > I want to be able to compile in the ELF format with DJGPP. Is there any way > > to do this? > > The default DJGPP distribution produces COFF, not ELF. Correct me if I'm wrong, but you used COFF because "It was the best at the time (better than a.out), and ELF didn't exist yet". > Why do you need ELF? > > It's likely you're targetting some *other* system besides djgpp, in > which case what you need is a djgpp-hosted cross-compiler, not djgpp > itself.  For example, if you're targetting a bare-metal i386 platform, > you want an i386-elf cross compiler.  If you're targetting Linux, you > need an i686-pc-linux-gnu cross compiler. For some reason, it seems much more popular to target DOS/DJGPP from GNU/Linux than vice versa. Heck, some GNU/Linux distros (and other *nix) don't even include GCC (ack!). Very very very annoying. However, there is a really *old* Binutils 2.9 (before ".intel_syntax"!) for DOS that targets ELF. It's probably easier to just use something like YASM, though (which targets COFF and ELF, etc. and can handle NASM or AT&T syntax). http://www.geocities.com/dborca/djgpp/elf/djelf.html http://membres.lycos.fr/placr/binutils-2.9-elf.zip (2 MB) http://www.tortall.net/projects/yasm > If you just want a DJGPP system that uses ELF instead of COFF, search > the internet - it's been done before. http://www.geocities.com/dborca/djgpp/elf/djelf.html