From: H.J. Lu Date: Thu, 6 Jul 2017 13:52:13 +0000 (-0700) Subject: Convert 'L' to 'l' when setting wide_width to 1 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a0b7b105236d5bc65e8d3a35f1b4f34bcc5e3705;p=binutils-gdb.git Convert 'L' to 'l' when setting wide_width to 1 When setting wide_width to 1, convert 'L' to 'l'. Otherwise, %Lx/%Lu/%Ld will be passed to fprintf which will treat the argument as long long. * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width to 1. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index f7363ba61e2..eda1e3edea5 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2017-07-06 H.J. Lu + + * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width + to 1. + 2017-07-05 H.J. Lu * dwarf2.c (line_info_add_include_dir_stub): Replace time with diff --git a/bfd/bfd.c b/bfd/bfd.c index b6cdf3f0ab4..a119ac4f54e 100644 --- a/bfd/bfd.c +++ b/bfd/bfd.c @@ -727,7 +727,10 @@ _doprnt (FILE *stream, const char *format, va_list ap) either long long or long. */ if ((BFD_ARCH_SIZE < 64 || BFD_HOST_64BIT_LONG) && sptr[-2] == 'L') - wide_width = 1; + { + wide_width = 1; + sptr[-2] = 'l'; + } switch (wide_width) {