[committed] Fix printf_vma bugs vs. --enable-64-bit-bfd

Dave Korn dave.korn.cygwin@googlemail.com
Thu May 21 12:52:00 GMT 2009


    Hi all,

  As per the other day's discussion[*], there are some places in the dump code
that use the wrong function to print VMAs, resulting in the size depending on
the --enable-64-bit-bfd flag rather than the architecture of the BFD in question.

  The attached patch fixes this problem in coffgen.c and peXXigen.c, and has
been tested natively on i686-pc-cygwin and on i686-pc-linux-gnu x
{a29k-unknown-coff, alpha-freebsd, alpha-linuxecoff, alpha-unknown-linux,
alpha-unknown-linuxecoff, arm-epoc-pe, arm-unknown-coff, arm-unknown-linux,
arm-vxworks, arm-wince-pe, h8300-unknown-rtems, h8500-unknown-rtems,
hppa-unknown-linux, hppa64-unknown-linux, i370-unknown-linux, i386-coff,
i386-msdos, i386-pc-netbsdpe, i386-pc-pe, i586-linux, i586-pc-interix,
i586-pc-msdosdjgpp, i586-unknown-beospe, i586-unknown-coff, i686-pc-cygwin,
i686-pc-linux-gnu, i686-pc-mingw32, i960-intel-nindy, i960-unknown-coff,
ia64-unknown-linux, m68k-coff, m68k-unknown-coff, m68k-unknown-linux,
m68k-unknown-netbsd, m88k-unknown-coff, mcore-unknown-pe, mips-dec-bsd,
mips-unknown-ecoff, mips-unknown-linux, mips-unknown-pe, ns32k-unknown-netbsd,
or32-unknown-coff, powerpc-unknown-aix5, powerpc-unknown-linux,
powerpc64-unknown-linux, powerpcle-unknown-pe, ppc-eabi, s390-unknown-linux,
s390x-unknown-linux, sh-coff, sh-unknown-linux, sh-unknown-pe,
sh-unknown-rtems, sparc-unknown-coff, sparc-unknown-linux,
sparc64-unknown-linux, thumb-epoc-pe, tic30-unknown-coff, tic54x-unknown-coff,
tic80-unknown-coff, vax-unknown-netbsd, vax-unknown-vms, vms-vax,
w65-unknown-coff, x86_64-pc-freebsd, x86_64-pc-linux-gnu, x86_64-pc-mingw32,
x86_64-unknown-linux, z8k-coff, z8k-unknown-coff}, in all cases both with and
without --enable-64-bit-bfd, with no new fails and four new passes on 32-bit
targets using the enable option.  Applied.

bfd/ChangeLog:

	* coffgen.c (coff_print_symbol):  Use bfd_fprintf_vma, not
	fprintf_vma directly.
	* peXXigen.c (pe_print_edata):  Likewise.
	(pe_print_pdata):  Likewise.
	(_bfd_XX_print_ce_compressed_pdata):  Likewise.
	(_bfd_XX_print_private_bfd_data_common):  Likewise.

    cheers,
      DaveK
-- 
[*] - http://sourceware.org/ml/binutils/2009-05/msg00283.html and thread.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-vma-printing.diff
Type: text/x-c
Size: 6998 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20090521/e5a7be49/attachment.bin>


More information about the Binutils mailing list