Re: [PATCH v2] Make elf2ecoff work on 64bit host machines

From: Thomas Bogendoerfer
Date: Tue Jun 05 2018 - 05:57:29 EST


On Mon, 4 Jun 2018 15:14:04 -0700
Paul Burton <paul.burton@xxxxxxxx> wrote:

> > +#include <stdint.h>
>
> Could you move the #include <stdint.h> into ecoff.h? Since ecoff.h
> itself makes use of these types. I know the end result will be the same,
> but if anything else were ever to include ecoff.h then having the right
> includes there could make that easier.

as elf2ecoff.c uses these types, too, I'll leave the include and add an
additional one in ecoff.h.

> > printf
> > - ("Section %d: %s phys %lx size %lx file offset %lx\n",
> > + ("Section %d: %s phys %"PRIx32" size %"PRIx32" file offset %x\n",
>
> The offset (s_scnptr) format should probably be PRIx32 as well.

correct.

> I know you didn't introduce it but I think the tab before "file" in the
> string would be better represented in source using \t rather than the
> tab character itself, so perhaps you could change that for clarify here
> which would also avoid making the line so long.

ok.

Thomas.

--
SUSE Linux GmbH
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)