Re: COFF and byte ordering

Chris Eich <chrise@hpsrcje.sr.hp.com>
Fri, 26 Jun 1992 23:21:11 GMT

          From comp.compilers

Related articles
COFF and byte ordering chrise@sr.hp.com (Chris Eich) (1992-06-25)
Re: COFF and byte ordering sac@cygnus.com (1992-06-26)
Re: COFF and byte ordering chrise@hpsrcje.sr.hp.com (Chris Eich) (1992-06-26)
Re: COFF and byte ordering chrise@hpsrcje.sr.hp.com (Chris Eich) (1992-07-01)
| List of all articles for this month |

Newsgroups: comp.compilers
From: Chris Eich <chrise@hpsrcje.sr.hp.com>
Organization: Compilers Central
Date: Fri, 26 Jun 1992 23:21:11 GMT
Keywords: linker
References: 92-06-128

I subsequently found that the tools I'm looking at are smart enough to
recognize an "other-endian" COFF file and swap the relevant bytes. (Hint:
the magic number is a short containing different bytes.)


One person suggested conv(1), which seems to be BSDish (I don't have it on
HP-UX). If it's a generic "byte-swap the entire file" tool, it won't
work, since 1) it won't know whether to swap 2 or 4 bytes, and 2) it will
try to byte-swap the "raw" parts of the file (i.e. those written in a
fixed byte order).


Chris Eich
Hewlett-Packard
[Actually, conv is a Sys V program that swaps the byte order in COFF files
and also can convert archive formats and the like. -John]
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.