bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: COFF to ELF conversion bug?


From: Eli Zaretskii
Subject: Re: COFF to ELF conversion bug?
Date: Wed, 8 May 2002 13:16:02 +0300 (IDT)

On Wed, 8 May 2002, Serge Semashko wrote:

> We are developing a crossplatform project. Some parts of our program are
> written in assembly and compiled with TASM. Switch to other assembler
> is impossible due to massive use of TASM specific macros. It is
> possible to convert OMF object files to COFF using EDITBIN utility by
> Microsoft. All these object files link well when the project is being
> compiled with Mingw and everything works properly. The problems appear
> when trying to compile the project in linux. The executable compiles
> normally but when executed it dies from access violation signal.
> Tracing the program with debugger shows that there is invalid code
> generated for relative call instructions (0xE8 opcode). All the target
> addresses are 4 bytes shifted and the program does not work. As far as
> I know there is ELF object file format used in linux and it is likely
> that object files are improperly converted from COFF to ELF.

I think what you see is a known problem with Microsoft COFF format: it 
differs from all the other COFF exactly like you described, by a shift in 
the target address.  So I'm guessing that EDITBIN produces Microsoft 
variety of COFF, not the COFF expected by the MinGW linker.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]