www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/15/08:46:46

Date: Sun, 15 Mar 1998 15:44:58 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Gregory Gerard <ggerard AT flash DOT net>
cc: djgpp AT delorie DOT com
Subject: Re: coff to elf? any easy way?
In-Reply-To: <ggerard-1203982133340001@paltc6-34.flash.net>
Message-ID: <Pine.SUN.3.91.980315154430.9861L-100000@is>
MIME-Version: 1.0

On Thu, 12 Mar 1998, Gregory Gerard wrote:

> Is there any easy way to take a .o file compiled under djgpp and link it
> in with other elf libraries to form an elf executable?  Especially when
> one of those elf libraries is the stdlib?

Try using `objcopy' from Binutils which were built with both COFF and
ELF support.

Note that since you didn't tell why do you need this conversion, the
above solution might not be what you want.  In particular, some
object modules in the library might need external objects from some
other library which don't exist on the target platform, and so you
will have unresolved externals on your hands.

> I've noticed that an underscore is put in front of symbols in the
> coff-i386 file (objdump --syms tells me as much.)  When I try objcopy
> -remove-leading-char (spelled correctly of course.), nothing happens.  I'm
> thinking it it tries to guess what the common char is by seeing if every
> symbol leads with the same char.

This should be posted to gnu.utils.bug news group.  It might be a real
bug in Binutils.

- Raw text -


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