This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: Properly dump addend in readelf
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Sat, 2 Oct 2010 12:17:01 +0000 (UTC)
- Subject: Re: PATCH: Properly dump addend in readelf
- References: <20101002060248.GA23161@intel.com>
On Fri, 1 Oct 2010, H.J. Lu wrote:
> if (off < 0)
> - printf (" - %lx", - off);
> + printf (" - %llx", - off);
> else
> - printf (" + %lx", off);
> + printf (" + %llx", off);
Use of %ll formats isn't portable across hosts; MinGW needs %I64. See
BFD_VMA_FMT in bfd-in.h, for example, or print_vma in binutils/prdbg.c.
--
Joseph S. Myers
joseph@codesourcery.com