This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[patch] Fix PR11025
- From: Rafael Espindola <espindola at google dot com>
- To: Binutils <binutils at sourceware dot org>
- Cc: Ian Lance Taylor <iant at google dot com>, "H.J. Lu" <hjl dot tools at gmail dot com>
- Date: Fri, 27 Nov 2009 09:36:09 -0500
- Subject: [patch] Fix PR11025
The attached patch fixes PR11025. It assumes that long long is 64
bits, but I think this assumption exists in other places in gold. If
not, what is the correct way to printf a 64 bit value in c++?
2009-11-27 Rafael Avila de Espindola <espindola@google.com>
* incremental-dump.cc (main): Use lld to print 64 bit values.
Cheers,
--
Rafael Ãvila de EspÃndola
diff --git a/gold/incremental-dump.cc b/gold/incremental-dump.cc
index a250068..db8a3cd 100644
--- a/gold/incremental-dump.cc
+++ b/gold/incremental-dump.cc
@@ -148,7 +148,8 @@ main(int argc, char** argv)
return 1;
}
printf(" %s\n", objname);
- printf(" Timestamp sec = %ld\n", input->timestamp_sec);
+ printf(" Timestamp sec = %lld\n",
+ static_cast<unsigned long long>(input->timestamp_sec));
printf(" Timestamp nsec = %d\n", input->timestamp_nsec);
printf(" Type = ");
// TODO: print the data at input->data_offset once we have it.