delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/12/13/13:20:25

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Thu, 13 Dec 2001 21:18:59 +0300
From: egor duda <deo AT logos-m DOT ru>
X-Mailer: The Bat! (v1.53 RC/4)
Reply-To: egor duda <cygwin AT cygwin DOT com>
Organization: deo
X-Priority: 3 (Normal)
Message-ID: <8327099136.20011213211859@logos-m.ru>
To: "Ray Campbell" <raycampbell AT rcn DOT com>
CC: cygwin AT cygwin DOT com
Subject: Re: Object File format
In-Reply-To: <PDEBIALJCGOKPNCMENIJKEDPCAAA.raycampbell@rcn.com>
References: <PDEBIALJCGOKPNCMENIJKEDPCAAA DOT raycampbell AT rcn DOT com>
MIME-Version: 1.0

Hi!

Thursday, 13 December, 2001 Ray Campbell raycampbell AT rcn DOT com wrote:

RC> I am trying to learn more about compiler development, and thus more
RC> information about ELF files.  I thought that c++ object files were in the
RC> ELF format, generated in cygwin with the c++ compiler, but when I try to
RC> read them, either with readelf, or in debug, they don't appear to be.  Is
RC> there anyway I can generate these files in elf format?  Or am I just doing
RC> something wrong?  Thank you in advance for your time.

the format of files generated by gcc depends on platform. it's ELF for
linux/freebsd/a bunch of other unices, COFF for windows, etc. windows
can't run ELF binaries, and gcc provided with cygwin is intended to
produce windows executables. if you want to build ELF executables for,
say, linux, you should build gcc as cross-compiler.

I'd suggest an excellent book "Linkers and loaders" by John Levine
(you can download a draft from http://www.iecc.com/linker/) -- it
describes in great detail how all those things work. 

a good introduction to cross-compilation stuff can be found at
http://www.airs.com/ian/configure/ 

Egor.            mailto:deo AT logos-m DOT ru ICQ 5165414 FidoNet 2:5020/496.19


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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