Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Wed, 5 Feb 2003 21:32:50 -0500
From: Christopher Faylor <cgf@redhat.com>
To: cygwin@cygwin.com
Subject: Re: Why won't my files link?
Message-ID: <20030206023250.GD14293@redhat.com>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <Pine.GSO.4.44.0302051037250.25432-100000@slinky.cs.nyu.edu> <Pine.OSF.4.33.0302051721540.19748-100000@occs.cs.oberlin.edu> <20030205230639.GE11184@redhat.com> <023601c2cd6b$a1aa4300$78d96f83@pomello> <20030205231312.GA12326@redhat.com> <BAY2-DAV33CnzNwRC6H000049d3@hotmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <BAY2-DAV33CnzNwRC6H000049d3@hotmail.com>
User-Agent: Mutt/1.5.1i

On Thu, Feb 06, 2003 at 10:22:33AM +1100, Gareth Pearce wrote:
>
>----- Original Message -----
>From: "Christopher Faylor" <cgf@redhat.com>
>To: <cygwin@cygwin.com>
>Sent: Thursday, February 06, 2003 10:13 AM
>Subject: Re: Why won't my files link?
>
>
>> On Wed, Feb 05, 2003 at 11:09:27PM -0000, Max Bowsher wrote:
>> >Chris, you're skim-reading too fast...
>> >
>> >Christopher Faylor wrote:
>> >> You need to '#include <stdio.h>' in io_functions.c.
>> >
>> >
>> >> On Wed, Feb 05, 2003 at 05:23:45PM -0500, Nick Miller wrote:
>> >
>> >... here's the problem:
>> >
>> >>> 2) I used the SAME io_functions.o file in both Cygwin and Linux.
>> >>> This file was generated by a CS professor at my school using GCC.
>>
>> No, I wasn't skim reading.  I was assuming that no one would actually
>> take an object file from linux and attempt to use it on windows.
>
>Interesting, where as my assumption was your assumption was that despite the
>fact that indeed there are people out there crazy enough to use the same .o
>file - it wouldnt give that error.

Um, er, right, I think.  I am actually surprised that ld managed to get
that far into linking the file.

That seems to mean that you could make an elf-format object file with all
of the right function "linkages" for cygwin and link it on Windows.

I know that, these days, binutils can handle multiple different formats
by default but I never worked through that this could result in this
kind of behavior.

Learn something new...


cgf

--
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/

